mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: perf: Fix crash/memory corruption on failed VM start
The new perf code didn't bother to clear a pointer in 'priv' causing a double free or other memory corruption goodness if a VM failed to start. Clear the pointer after freeing the memory. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1324757
This commit is contained in:
parent
be6e92f541
commit
03e8d5fb54
@ -3444,6 +3444,7 @@ qemuDomainPerfRestart(virDomainObjPtr vm)
|
||||
|
||||
cleanup:
|
||||
virPerfFree(priv->perf);
|
||||
priv->perf = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -5970,6 +5971,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
virCgroupFree(&priv->cgroup);
|
||||
|
||||
virPerfFree(priv->perf);
|
||||
priv->perf = NULL;
|
||||
|
||||
qemuProcessRemoveDomainStatus(driver, vm);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user