At that point the perf events struct should not be allocated so there's
no use in clearing it.
---
src/qemu/qemu_process.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index af06aa6..41a2b35 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -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++) {
--
2.8.1