qemu: Fix crash at the end of migration

The destination daemon would crash in Finish phase due to NULL
dereference which I missed in my review of commit
v8.0.0-428-g0301db44e2

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2022-02-17 09:36:48 +01:00
parent 096e3c72ec
commit f3c2b321e0

View File

@ -5855,7 +5855,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
if (jobData) {
priv->job.completed = g_steal_pointer(&jobData);
priv->job.completed->status = VIR_DOMAIN_JOB_STATUS_COMPLETED;
qemuDomainJobSetStatsType(jobData,
qemuDomainJobSetStatsType(priv->job.completed,
QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION);
}