[PATCH 6/6] qemu: process: Don't needlesly clear the perf events in qemuDomainPerfRestart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]