diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 291f49041494fbaf620a4d06b4e2aa0f067de4fe..861f541de0f6cbf0d39b24b4ad7d399838b07f06 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17368,8 +17368,11 @@ qemuConnectGetAllDomainStats(virConnectPtr conn, continue; if (!domlist && - !virConnectGetAllDomainStatsCheckACL(conn, dom->def)) + !virConnectGetAllDomainStatsCheckACL(conn, dom->def)) { + virObjectUnlock(dom); + dom = NULL; continue; + } if (qemuDomainGetStats(conn, dom, stats, &tmp, flags) < 0) goto cleanup;