In error case, free event->vm instead of vm.
This makes it easier for the reader to understand what we should free.
Signed-off-by: Shaleen Bathla <shaleen.bathla(a)oracle.com>
---
src/qemu/qemu_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ee9f0784d3a3..83b553418068 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -287,7 +287,7 @@ qemuProcessEventSubmit(virDomainObj *vm,
event->data = data;
if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) {
- virObjectUnref(vm);
+ virObjectUnref(event->vm);
qemuProcessEventFree(event);
}
}
--
2.31.1