[libvirt PATCH 7/8] util: convert VIR_FREE to g_free in other functions that free their arg

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

 



Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/util/virconf.c   | 4 ++--
 src/util/virerror.c  | 4 ++--
 src/util/virobject.c | 2 +-
 src/util/virstring.c | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/util/virconf.c b/src/util/virconf.c
index d85fc32b64..16107bce96 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -151,11 +151,11 @@ virConfFreeValue(virConfValuePtr val)
         return;
     if (val->type == VIR_CONF_STRING &&
         val->str != NULL)
-        VIR_FREE(val->str);
+        g_free(val->str);
     if (val->type == VIR_CONF_LIST &&
         val->list != NULL)
         virConfFreeList(val->list);
-    VIR_FREE(val);
+    g_free(val);
 }
 
 virConfPtr
diff --git a/src/util/virerror.c b/src/util/virerror.c
index 14054add41..708081414a 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -158,7 +158,7 @@ virLastErrFreeData(void *data)
     if (!err)
         return;
     virResetError(err);
-    VIR_FREE(err);
+    g_free(err);
 }
 
 
@@ -477,7 +477,7 @@ void
 virFreeError(virErrorPtr err)
 {
     virResetError(err);
-    VIR_FREE(err);
+    g_free(err);
 }
 
 /**
diff --git a/src/util/virobject.c b/src/util/virobject.c
index ce40ffae22..370a64bd6d 100644
--- a/src/util/virobject.c
+++ b/src/util/virobject.c
@@ -655,5 +655,5 @@ virObjectListFreeCount(void *list,
     for (i = 0; i < count; i++)
         virObjectUnref(((void **)list)[i]);
 
-    VIR_FREE(list);
+    g_free(list);
 }
diff --git a/src/util/virstring.c b/src/util/virstring.c
index c98435388a..c3e64007fe 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -108,9 +108,9 @@ virStringListFreeCount(char **strings,
         return;
 
     for (i = 0; i < count; i++)
-        VIR_FREE(strings[i]);
+        g_free(strings[i]);
 
-    VIR_FREE(strings);
+    g_free(strings);
 }
 
 
-- 
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