提交 03e8d5fb 编写于 作者: P Peter Krempa

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
上级 be6e92f5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册