mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: Make vm parameter of qemuProcessEventSubmit mandatory
All callers (QMP event handlers) always pass non-NULL vm pointer. Let's make the parameter mandatory. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
3ccd69f8c0
commit
7b5046ff6c
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user