mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05: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:
1 parent
61b52d2e38
commit
d1c7b00b60
1 file changed
+1
-2
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user