qemuProcessEventSubmit : Unref event->vm instead of vm

In error case, unref event->vm instead of vm. This makes it
easier for the reader to understand as it is the event struct
that's holding the reference.

Signed-off-by: Shaleen Bathla <shaleen.bathla@oracle.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Shaleen Bathla 2023-01-17 14:52:13 +05:30 committed by Michal Privoznik
parent 7b5777afcb
commit 228e5a98d2

View File

@ -287,7 +287,7 @@ qemuProcessEventSubmit(virDomainObj *vm,
event->data = data;
if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) {
virObjectUnref(vm);
virObjectUnref(event->vm);
qemuProcessEventFree(event);
}
}