mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
abddeb8434
commit
9f845b1115
@ -17402,7 +17402,7 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
|
||||
if (!(dom = qemuDomObjFromDomain(doms[i])))
|
||||
continue;
|
||||
|
||||
if (!domlist &&
|
||||
if (doms != domlist &&
|
||||
!virConnectGetAllDomainStatsCheckACL(conn, dom->def))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user