[libvirt RFC PATCH 3/5] conf: replace pointless VIR_FREEs with g_free in virDomainVideoDefClear()

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

 



This function does a memset(0) at the end anyway, so there's no point
in VIR_FREE vs g_free.

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 3505d29dbe..d8b8ef38f5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2960,13 +2960,13 @@ virDomainVideoDefClear(virDomainVideoDefPtr def)
     virDomainDeviceInfoClear(&def->info);
 
     if (def->accel)
-        VIR_FREE(def->accel->rendernode);
-    VIR_FREE(def->accel);
-    VIR_FREE(def->res);
-    VIR_FREE(def->virtio);
+        g_free(def->accel->rendernode);
+    g_free(def->accel);
+    g_free(def->res);
+    g_free(def->virtio);
     if (def->driver)
-        VIR_FREE(def->driver->vhost_user_binary);
-    VIR_FREE(def->driver);
+        g_free(def->driver->vhost_user_binary);
+    g_free(def->driver);
     virObjectUnref(def->privateData);
 
     memset(def, 0, sizeof(*def));
-- 
2.29.2




[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]

  Powered by Linux