On Tue, Jun 27, 2023 at 11:43:58 +0300, Nikolai Barybin wrote:
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.
Signed-off-by: Nikolai Barybin <nikolai.barybin(a)virtuozzo.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 d3b1bdf6a4..db06991450 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -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);
Right, and it used to be this way until commit v8.0.0-427-gf304de0df6
Fixes: v8.0.0-427-gf304de0df6
Reviewed-by: Jiri Denemark <jdenemar(a)redhat.com>
And pushed, thanks.