提交 22e46474 编写于 作者: P Peter Krempa

qemu: process: Don't needlesly clear the perf events in qemuDomainPerfRestart

At that point the perf events struct should not be allocated so there's
no use in clearing it.
上级 edadd46c
......@@ -3492,10 +3492,7 @@ qemuDomainPerfRestart(virDomainObjPtr vm)
virDomainDefPtr def = vm->def;
qemuDomainObjPrivatePtr priv = vm->privateData;
virPerfFree(priv->perf);
priv->perf = virPerfNew();
if (!priv->perf)
if (!(priv->perf = virPerfNew()))
return -1;
for (i = 0; i < VIR_PERF_EVENT_LAST; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册