提交 19f916a7 编写于 作者: W Wen Congyang 提交者: Wen Congyang

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.
上级 d9588747
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册