mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 13:35:17 +00:00
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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
b260a77e34
commit
54a2411220
@ -3219,10 +3219,7 @@ error:
|
|||||||
if (!virDomainObjIsActive(obj)) {
|
if (!virDomainObjIsActive(obj)) {
|
||||||
if (virObjectUnref(obj))
|
if (virObjectUnref(obj))
|
||||||
virObjectUnlock(obj);
|
virObjectUnlock(obj);
|
||||||
return;
|
} else if (virObjectUnref(obj)) {
|
||||||
}
|
|
||||||
|
|
||||||
if (virObjectUnref(obj)) {
|
|
||||||
/* We can't get the monitor back, so must kill the VM
|
/* We can't get the monitor back, so must kill the VM
|
||||||
* to remove danger of it ending up running twice if
|
* to remove danger of it ending up running twice if
|
||||||
* user tries to start it again later
|
* user tries to start it again later
|
||||||
|
Loading…
x
Reference in New Issue
Block a user