mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-08 22:39:56 +00:00
Fix crash in QEMU auto-destroy with transient guests
When the auto-destroy callback runs it is supposed to return NULL if the virDomainObjPtr is no longer valid. It was not doing this for transient guests, so we tried to virObjectUnlock a mutex which had been freed. This often led to a crash. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
20fa62414c
commit
7ccad0b16d
@ -4629,8 +4629,10 @@ qemuProcessAutoDestroy(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
if (!qemuDomainObjEndJob(driver, dom))
|
if (!qemuDomainObjEndJob(driver, dom))
|
||||||
dom = NULL;
|
dom = NULL;
|
||||||
if (dom && !dom->persistent)
|
if (dom && !dom->persistent) {
|
||||||
qemuDomainRemoveInactive(driver, dom);
|
qemuDomainRemoveInactive(driver, dom);
|
||||||
|
dom = NULL;
|
||||||
|
}
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user