mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu: Fix possible NULL deref in qemuDomainSaveImageStartVM
Commit 075523438 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: John Ferlan <jferlan@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
a6ce760f6b
commit
11e8d37c4b
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user