mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
do not lock vm while allocating memory
There is no need to lock vm while allocating memory. If allocating memory failed, we forgot to unlock vm.
This commit is contained in:
parent
d958874780
commit
19f916a764
@ -525,8 +525,6 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainEventGraphicsSubjectPtr subject = NULL;
|
||||
int i;
|
||||
|
||||
virDomainObjLock(vm);
|
||||
|
||||
if (VIR_ALLOC(localAddr) < 0)
|
||||
goto no_memory;
|
||||
localAddr->family = localFamily;
|
||||
@ -560,6 +558,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
subject->nidentity++;
|
||||
}
|
||||
|
||||
virDomainObjLock(vm);
|
||||
event = virDomainEventGraphicsNewFromObj(vm, phase, localAddr, remoteAddr, authScheme, subject);
|
||||
virDomainObjUnlock(vm);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user