mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu: prevent SIGSEGV in qemuProcessHandleDumpCompleted
If VIR_ASYNC_JOB_NONE flag is present, job.current is equal to NULL, which leads to SIGSEGV. Thus, this check should be moved up. Fixes: v8.0.0-427-gf304de0df6 Signed-off-by: Nikolai Barybin <nikolai.barybin@virtuozzo.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
83686f1eea
commit
2d6659e778
@ -1601,11 +1601,11 @@ qemuProcessHandleDumpCompleted(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
vm, vm->def->name, stats, NULLSTR(error));
|
||||
|
||||
jobPriv = vm->job->privateData;
|
||||
privJobCurrent = vm->job->current->privateData;
|
||||
if (vm->job->asyncJob == VIR_ASYNC_JOB_NONE) {
|
||||
VIR_DEBUG("got DUMP_COMPLETED event without a dump_completed job");
|
||||
goto cleanup;
|
||||
}
|
||||
privJobCurrent = vm->job->current->privateData;
|
||||
jobPriv->dumpCompleted = true;
|
||||
privJobCurrent->stats.dump = *stats;
|
||||
vm->job->error = g_strdup(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user