提交 bcc57107 编写于 作者: J Jiri Denemark

qemu: Fix crash in offline migration

When migrating a shutoff domain (i.e., offline migration), we have no
statistics to report and thus jobInfo will be NULL in
qemuMigrationFinish.

Broken by me in v3.10.0-183-ge8784e78.

https://bugzilla.redhat.com/show_bug.cgi?id=1536351Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 6d4a3cd4
......@@ -5481,8 +5481,10 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
}
if (dom) {
VIR_STEAL_PTR(priv->job.completed, jobInfo);
priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
if (jobInfo) {
VIR_STEAL_PTR(priv->job.completed, jobInfo);
priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
}
if (qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen,
QEMU_MIGRATION_COOKIE_STATS) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册