mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-11 07:55:58 -06:00
Release VM lock before acquiring virDomainObjListPtr lock
When removing a VM from the virDomainObjListPtr, we must not be holding the VM lock while acquiring the list lock. Re-order code to ensure that we can release the VM lock early.
This commit is contained in:
parent
61b52d2e38
commit
d1c7b00b60
@ -2116,11 +2116,10 @@ void virDomainObjListRemove(virDomainObjListPtr doms,
|
||||
{
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
||||
virObjectLock(doms);
|
||||
virUUIDFormat(dom->def->uuid, uuidstr);
|
||||
|
||||
virObjectUnlock(dom);
|
||||
|
||||
virObjectLock(doms);
|
||||
virHashRemoveEntry(doms->objs, uuidstr);
|
||||
virObjectUnlock(doms);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user