]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain_conf: fix domain deadlock
authorPavel Hrdina <phrdina@redhat.com>
Mon, 22 Sep 2014 16:19:07 +0000 (18:19 +0200)
committerDaniel Veillard <veillard@redhat.com>
Wed, 1 Oct 2014 08:22:02 +0000 (16:22 +0800)
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>
src/conf/domain_conf.c

index b1147375497d41863ee94b41711c7dfd112d3301..6ea25df401ba334eb6cf55b613ac1711e196b8c8 100644 (file)
@@ -20560,7 +20560,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))) {