domain_conf: fix domain deadlock

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>
This commit is contained in:
Pavel Hrdina authored and Daniel Veillard committed 2014-10-01 16:22:02 +08:00
1 parent fe808d95bf
commit fc22b2e748
1 file changed
+1 -1
+1 -1
View 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))) {