[libvirt PATCH 16/21] tools: 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>
---
 tools/virsh-checkpoint.c     |  6 +++---
 tools/virsh-domain-monitor.c |  4 ++--
 tools/virsh-domain.c         |  2 +-
 tools/virsh-interface.c      |  4 ++--
 tools/virsh-network.c        |  8 ++++----
 tools/virsh-nodedev.c        |  4 ++--
 tools/virsh-nwfilter.c       |  8 ++++----
 tools/virsh-pool.c           |  4 ++--
 tools/virsh-secret.c         |  4 ++--
 tools/virsh-snapshot.c       |  6 +++---
 tools/virsh-volume.c         |  4 ++--
 tools/vsh-table.c            | 10 +++++-----
 tools/vsh.c                  |  6 +++---
 13 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c
index f6396d16eb..6e68ba66ff 100644
--- a/tools/virsh-checkpoint.c
+++ b/tools/virsh-checkpoint.c
@@ -552,11 +552,11 @@ virshCheckpointListFree(virshCheckpointListPtr checkpointlist)
     if (checkpointlist->chks) {
         for (i = 0; i < checkpointlist->nchks; i++) {
             virshDomainCheckpointFree(checkpointlist->chks[i].chk);
-            VIR_FREE(checkpointlist->chks[i].parent);
+            g_free(checkpointlist->chks[i].parent);
         }
-        VIR_FREE(checkpointlist->chks);
+        g_free(checkpointlist->chks);
     }
-    VIR_FREE(checkpointlist);
+    g_free(checkpointlist);
 }
 
 
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 5d0a03afa9..02ff1fbd62 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1609,9 +1609,9 @@ virshDomainListFree(virshDomainListPtr domlist)
     if (domlist && domlist->domains) {
         for (i = 0; i < domlist->ndomains; i++)
             virshDomainFree(domlist->domains[i]);
-        VIR_FREE(domlist->domains);
+        g_free(domlist->domains);
     }
-    VIR_FREE(domlist);
+    g_free(domlist);
 }
 
 static virshDomainListPtr
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index fb8b4bdb72..98a87dd43c 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1796,7 +1796,7 @@ virshBlockJobWaitFree(virshBlockJobWaitDataPtr data)
     if (data->cb_id2 >= 0)
         virConnectDomainEventDeregisterAny(priv->conn, data->cb_id2);
 
-    VIR_FREE(data);
+    g_free(data);
 }
 
 
diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index 858052d341..a11d4ba607 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -176,9 +176,9 @@ virshInterfaceListFree(virshInterfaceListPtr list)
             if (list->ifaces[i])
                 virInterfaceFree(list->ifaces[i]);
         }
-        VIR_FREE(list->ifaces);
+        g_free(list->ifaces);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshInterfaceListPtr
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 9e3b31a60c..a203fa64ff 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -459,9 +459,9 @@ virshNetworkListFree(virshNetworkListPtr list)
             if (list->nets[i])
                 virNetworkFree(list->nets[i]);
         }
-        VIR_FREE(list->nets);
+        g_free(list->nets);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshNetworkListPtr
@@ -1676,9 +1676,9 @@ virshNetworkPortListFree(virshNetworkPortListPtr list)
             if (list->ports[i])
                 virNetworkPortFree(list->ports[i]);
         }
-        VIR_FREE(list->ports);
+        g_free(list->ports);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshNetworkPortListPtr
diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index 69422e20f5..fedc8497f8 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -205,9 +205,9 @@ virshNodeDeviceListFree(virshNodeDeviceListPtr list)
             if (list->devices[i])
                 virNodeDeviceFree(list->devices[i]);
         }
-        VIR_FREE(list->devices);
+        g_free(list->devices);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshNodeDeviceListPtr
diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c
index 768a96e949..0d09a016bc 100644
--- a/tools/virsh-nwfilter.c
+++ b/tools/virsh-nwfilter.c
@@ -234,9 +234,9 @@ virshNWFilterListFree(virshNWFilterListPtr list)
             if (list->filters[i])
                 virNWFilterFree(list->filters[i]);
         }
-        VIR_FREE(list->filters);
+        g_free(list->filters);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshNWFilterListPtr
@@ -654,9 +654,9 @@ virshNWFilterBindingListFree(virshNWFilterBindingListPtr list)
             if (list->bindings[i])
                 virNWFilterBindingFree(list->bindings[i]);
         }
-        VIR_FREE(list->bindings);
+        g_free(list->bindings);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index 7835fa6d75..5256b50589 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -850,9 +850,9 @@ virshStoragePoolListFree(virshStoragePoolListPtr list)
             if (list->pools[i])
                 virStoragePoolFree(list->pools[i]);
         }
-        VIR_FREE(list->pools);
+        g_free(list->pools);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshStoragePoolListPtr
diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index fcfbe5fe9e..7ca3e864da 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -410,9 +410,9 @@ virshSecretListFree(virshSecretListPtr list)
         for (i = 0; i < list->nsecrets; i++)
             virshSecretFree(list->secrets[i]);
 
-        VIR_FREE(list->secrets);
+        g_free(list->secrets);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshSecretListPtr
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index 478657b5b6..1b10ef37e3 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -1032,11 +1032,11 @@ virshSnapshotListFree(virshSnapshotListPtr snaplist)
     if (snaplist->snaps) {
         for (i = 0; i < snaplist->nsnaps; i++) {
             virshDomainSnapshotFree(snaplist->snaps[i].snap);
-            VIR_FREE(snaplist->snaps[i].parent);
+            g_free(snaplist->snaps[i].parent);
         }
-        VIR_FREE(snaplist->snaps);
+        g_free(snaplist->snaps);
     }
-    VIR_FREE(snaplist);
+    g_free(snaplist);
 }
 
 static int
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index c86abb863f..af2d1d42a3 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -1273,9 +1273,9 @@ virshStorageVolListFree(virshStorageVolListPtr list)
             if (list->vols[i])
                 virStorageVolFree(list->vols[i]);
         }
-        VIR_FREE(list->vols);
+        g_free(list->vols);
     }
-    VIR_FREE(list);
+    g_free(list);
 }
 
 static virshStorageVolListPtr
diff --git a/tools/vsh-table.c b/tools/vsh-table.c
index 4471368687..d09cc9e14e 100644
--- a/tools/vsh-table.c
+++ b/tools/vsh-table.c
@@ -52,10 +52,10 @@ vshTableRowFree(vshTableRowPtr row)
         return;
 
     for (i = 0; i < row->ncells; i++)
-        VIR_FREE(row->cells[i]);
+        g_free(row->cells[i]);
 
-    VIR_FREE(row->cells);
-    VIR_FREE(row);
+    g_free(row->cells);
+    g_free(row);
 }
 
 
@@ -69,8 +69,8 @@ vshTableFree(vshTablePtr table)
 
     for (i = 0; i < table->nrows; i++)
         vshTableRowFree(table->rows[i]);
-    VIR_FREE(table->rows);
-    VIR_FREE(table);
+    g_free(table->rows);
+    g_free(table);
 }
 
 
diff --git a/tools/vsh.c b/tools/vsh.c
index 0e2d4955b4..202bd564f7 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -719,8 +719,8 @@ vshCommandOptFree(vshCmdOpt * arg)
 
         a = a->next;
 
-        VIR_FREE(tmp->data);
-        VIR_FREE(tmp);
+        g_free(tmp->data);
+        g_free(tmp);
     }
 }
 
@@ -735,7 +735,7 @@ vshCommandFree(vshCmd *cmd)
         c = c->next;
 
         vshCommandOptFree(tmp->opts);
-        VIR_FREE(tmp);
+        g_free(tmp);
     }
 }
 
-- 
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