mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 08:35:15 +00:00
qemu: Fix qemuProcessAutoDestroy
Upon entry from virCloseCallbacksRun, the @dom will have a Ref and Lock from virDomainObjListFindByUUIDRef, so there's no need to take an extra reference nor should the code call virDomainObjEndAPI when done since that both Unref's and Unlock's the @dom which means the callers call to EndAPI would be unlocking an unlocked object. At least the Ref saved the code from referencing something already freed. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
This commit is contained in:
parent
990dd4b356
commit
67757b066c
@ -7058,8 +7058,6 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
|
|||||||
|
|
||||||
VIR_DEBUG("vm=%s, conn=%p", dom->def->name, conn);
|
VIR_DEBUG("vm=%s, conn=%p", dom->def->name, conn);
|
||||||
|
|
||||||
virObjectRef(dom);
|
|
||||||
|
|
||||||
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN)
|
if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_IN)
|
||||||
stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED;
|
stopFlags |= VIR_QEMU_PROCESS_STOP_MIGRATED;
|
||||||
|
|
||||||
@ -7089,7 +7087,6 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
|
|||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainObjEndAPI(&dom);
|
|
||||||
return dom;
|
return dom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user