mirror of https://gitee.com/openkylin/libvirt.git
tools: replace VIR_FREE with g_free in all vir*Free() functions
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
a9e72390e8
commit
6b1595317c
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1796,7 +1796,7 @@ virshBlockJobWaitFree(virshBlockJobWaitDataPtr data)
|
|||
if (data->cb_id2 >= 0)
|
||||
virConnectDomainEventDeregisterAny(priv->conn, data->cb_id2);
|
||||
|
||||
VIR_FREE(data);
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue