All callers (QMP event handlers) always pass non-NULL vm pointer. Let's
make the parameter mandatory.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_process.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 44a4bcfd74..e492f6961d 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -284,16 +284,14 @@ qemuProcessEventSubmit(virQEMUDriver *driver,
{
struct qemuProcessEvent *event = g_new0(struct qemuProcessEvent, 1);
- if (vm)
- event->vm = virObjectRef(vm);
+ event->vm = virObjectRef(vm);
event->eventType = eventType;
event->action = action;
event->status = status;
event->data = data;
if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) {
- if (vm)
- virObjectUnref(vm);
+ virObjectUnref(vm);
qemuProcessEventFree(event);
}
}
--
2.35.1