commit 03e8d5fb54c7c897225ed9ea56d83b894930f144 Author: Peter Krempa Date: Thu Apr 7 12:50:15 2016 +0200 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 Index: libvirt-1.3.3/src/qemu/qemu_process.c =================================================================== --- libvirt-1.3.3.orig/src/qemu/qemu_process.c +++ libvirt-1.3.3/src/qemu/qemu_process.c @@ -3444,6 +3444,7 @@ qemuDomainPerfRestart(virDomainObjPtr vm cleanup: virPerfFree(priv->perf); + priv->perf = NULL; return -1; } @@ -5959,6 +5960,7 @@ void qemuProcessStop(virQEMUDriverPtr dr virCgroupFree(&priv->cgroup); virPerfFree(priv->perf); + priv->perf = NULL; qemuProcessRemoveDomainStatus(driver, vm);