提交 11e8d37c 编写于 作者: J John Ferlan

qemu: Fix possible NULL deref in qemuDomainSaveImageStartVM

Commit 07552343 added a direct reference to @cookie even though
it may be NULL as shown by a comment a few lines previous - so add
the check here as well.

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 a6ce760f
......@@ -6831,7 +6831,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
qemuDomainFixupCPUs(vm, &cookie->cpu) < 0)
goto cleanup;
if (!cookie->slirpHelper)
if (cookie && !cookie->slirpHelper)
priv->disableSlirp = true;
if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册