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>
(cherry picked from commit fc22b2e748)
This commit is contained in:
Pavel Hrdina 2014-09-22 18:19:07 +02:00 committed by Eric Blake
parent fdde9d6a1b
commit c639118634

View File

@ -18785,7 +18785,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))) {