提交 e5baef83 编写于 作者: J John Ferlan

qemu: Resolve Coverity FORWARD_NULL

If the qemuMigrationEatCookie() fails to set mig, we jump to cleanup:
which will call qemuMigrationCancelDriveMirror() without first checking
if mig == NULL
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 114ebecd
......@@ -3614,7 +3614,8 @@ qemuMigrationRun(virQEMUDriverPtr driver,
orig_err = virSaveLastError();
/* cancel any outstanding NBD jobs */
qemuMigrationCancelDriveMirror(mig, driver, vm);
if (mig)
qemuMigrationCancelDriveMirror(mig, driver, vm);
if (spec->fwdType != MIGRATION_FWD_DIRECT) {
if (iothread && qemuMigrationStopTunnel(iothread, ret < 0) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册