提交 5ddb57e0 编写于 作者: D Daniel P. Berrange 提交者: Cole Robinson

Fix leak of objects when reconnecting to QEMU instances

The 'error' cleanup block in qemuProcessReconnect() had a
'return' statement in the middle of it. This caused a leak
of virConnectPtr & virQEMUDriverConfigPtr instances. This
was identified because netcf recently started checking its
refcount in libvirtd shutdown:

netcfStateCleanup:109 : internal error: Attempt to close netcf state driver with open connections
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 54a24112)
上级 9311f8c6
......@@ -3219,10 +3219,7 @@ error:
if (!virDomainObjIsActive(obj)) {
if (virObjectUnref(obj))
virObjectUnlock(obj);
return;
}
if (virObjectUnref(obj)) {
} else if (virObjectUnref(obj)) {
/* We can't get the monitor back, so must kill the VM
* to remove danger of it ending up running twice if
* user tries to start it again later
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册