[libvirt PATCH v2 11/24] locking: replace VIR_FREE with g_free in all vir*Free() functions

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

 



Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/locking/lock_daemon.c         |  6 +++---
 src/locking/lock_daemon_config.c  |  6 +++---
 src/locking/lock_driver_lockd.c   | 10 +++++-----
 src/locking/lock_driver_sanlock.c |  6 +++---
 src/locking/lock_manager.c        |  2 +-
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 851e9fc6f0..94fe374df6 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -92,7 +92,7 @@ virLockDaemonFree(virLockDaemonPtr lockd)
     virHashFree(lockd->lockspaces);
     virLockSpaceFree(lockd->defaultLockspace);
 
-    VIR_FREE(lockd);
+    g_free(lockd);
 }
 
 static inline void
@@ -435,8 +435,8 @@ virLockDaemonClientFree(void *opaque)
     }
 
     g_mutex_clear(&priv->lock);
-    VIR_FREE(priv->ownerName);
-    VIR_FREE(priv);
+    g_free(priv->ownerName);
+    g_free(priv);
 }
 
 
diff --git a/src/locking/lock_daemon_config.c b/src/locking/lock_daemon_config.c
index 6346703715..f693911997 100644
--- a/src/locking/lock_daemon_config.c
+++ b/src/locking/lock_daemon_config.c
@@ -71,10 +71,10 @@ virLockDaemonConfigFree(virLockDaemonConfigPtr data)
     if (!data)
         return;
 
-    VIR_FREE(data->log_filters);
-    VIR_FREE(data->log_outputs);
+    g_free(data->log_filters);
+    g_free(data->log_outputs);
 
-    VIR_FREE(data);
+    g_free(data);
 }
 
 static int
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 5ebefa48d0..a1deb55788 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -369,13 +369,13 @@ virLockManagerLockDaemonPrivateFree(virLockManagerLockDaemonPrivatePtr priv)
         return;
 
     for (i = 0; i < priv->nresources; i++) {
-        VIR_FREE(priv->resources[i].lockspace);
-        VIR_FREE(priv->resources[i].name);
+        g_free(priv->resources[i].lockspace);
+        g_free(priv->resources[i].name);
     }
-    VIR_FREE(priv->resources);
+    g_free(priv->resources);
 
-    VIR_FREE(priv->name);
-    VIR_FREE(priv);
+    g_free(priv->name);
+    g_free(priv);
 }
 
 static void virLockManagerLockDaemonFree(virLockManagerPtr lock)
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 7319f56819..aaffe30e6f 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -513,10 +513,10 @@ static void virLockManagerSanlockFree(virLockManagerPtr lock)
     if (!priv)
         return;
 
-    VIR_FREE(priv->vm_name);
+    g_free(priv->vm_name);
     for (i = 0; i < priv->res_count; i++)
-        VIR_FREE(priv->res_args[i]);
-    VIR_FREE(priv);
+        g_free(priv->res_args[i]);
+    g_free(priv);
     lock->privateData = NULL;
 }
 
diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index d83a192bf6..db724eb30f 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -387,7 +387,7 @@ int virLockManagerFree(virLockManagerPtr lock)
 
     lock->driver->drvFree(lock);
 
-    VIR_FREE(lock);
+    g_free(lock);
 
     return 0;
 }
-- 
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