mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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 commit2c680804
. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> (cherry picked from commitfc22b2e748
)
This commit is contained in:
parent
8a07faf337
commit
98e0692c96
@ -19331,7 +19331,7 @@ virDomainListPopulate(void *payload,
|
|||||||
/* just count the machines */
|
/* just count the machines */
|
||||||
if (!data->domains) {
|
if (!data->domains) {
|
||||||
data->ndomains++;
|
data->ndomains++;
|
||||||
return;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {
|
if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user