提交 9f845b11 编写于 作者: J John Ferlan

qemu: Resolve Coverity REVERSE_INULL

Coverity complains that checking for !domlist after setting doms = domlist
and making a deref of doms just above

It seems the call in question was intended to me made in the case that
'doms' was passed in and not when the virDomainObjListExport() call
allocated domlist and already called virConnectGetAllDomainStatsCheckACL().

Thus rather than check for !domlist - check that "doms != domlist" in
order to avoid the Coverity message.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 abddeb84
......@@ -17402,7 +17402,7 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
if (!(dom = qemuDomObjFromDomain(doms[i])))
continue;
if (!domlist &&
if (doms != domlist &&
!virConnectGetAllDomainStatsCheckACL(conn, dom->def))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册