From 9f845b1115f0b5be1554893f1b9ca2d5a3b8c7cd Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 4 Sep 2014 10:12:13 -0400 Subject: [PATCH] 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 --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 184691d899..b47d00f91a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17402,7 +17402,7 @@ qemuConnectGetAllDomainStats(virConnectPtr conn, if (!(dom = qemuDomObjFromDomain(doms[i]))) continue; - if (!domlist && + if (doms != domlist && !virConnectGetAllDomainStatsCheckACL(conn, dom->def)) continue; -- GitLab