]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
domain_conf: fix domain deadlock
authorPavel Hrdina <phrdina@redhat.com>
Mon, 22 Sep 2014 16:19:07 +0000 (18:19 +0200)
committerEric Blake <eblake@redhat.com>
Wed, 1 Oct 2014 18:19:19 +0000 (12:19 -0600)
If you use public api virConnectListAllDomains() with second parameter
set to NULL to get only the number of domains you will lock out all
other operations with domains.

Introduced by commit 2c680804.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit fc22b2e74890873848b43fffae43025d22053669)

src/conf/domain_conf.c

index abf2b6bcd951b34703edb7e4b6970d833241fc84..5c8ff732e5b491263689a5e4f28e964b0dea29af 100644 (file)
@@ -15947,7 +15947,7 @@ virDomainListPopulate(void *payload,
     /* just count the machines */
     if (!data->domains) {
         data->ndomains++;
-        return;
+        goto cleanup;
     }
 
     if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {