util: replace VIR_FREE with g_free in all *Dispose() functions

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Laine Stump 2021-02-03 15:15:23 -05:00
parent 124d8726e8
commit 2ca7234d7d
9 changed files with 29 additions and 29 deletions

View File

@ -604,7 +604,7 @@ dnsmasqCapsDispose(void *obj)
dnsmasqCapsPtr caps = obj;
virBitmapFree(caps->flags);
VIR_FREE(caps->binaryPath);
g_free(caps->binaryPath);
}
static int dnsmasqCapsOnceInit(void)

View File

@ -74,8 +74,8 @@ virFileCacheDispose(void *obj)
{
virFileCachePtr cache = obj;
VIR_FREE(cache->dir);
VIR_FREE(cache->suffix);
g_free(cache->dir);
g_free(cache->suffix);
virHashFree(cache->table);

View File

@ -297,7 +297,7 @@ virMediatedDeviceListDispose(void *obj)
}
list->count = 0;
VIR_FREE(list->devs);
g_free(list->devs);
}

View File

@ -166,7 +166,7 @@ virNVMeDeviceListDispose(void *obj)
for (i = 0; i < list->count; i++)
virNVMeDeviceFree(list->devs[i]);
VIR_FREE(list->devs);
g_free(list->devs);
}

View File

@ -1667,7 +1667,7 @@ virPCIDeviceListDispose(void *obj)
}
list->count = 0;
VIR_FREE(list->devs);
g_free(list->devs);
}
int

View File

@ -210,18 +210,18 @@ virResctrlInfoDispose(void *obj)
if (level->types) {
for (j = 0; j < VIR_CACHE_TYPE_LAST; j++)
VIR_FREE(level->types[j]);
g_free(level->types[j]);
}
VIR_FREE(level->types);
VIR_FREE(level);
g_free(level->types);
g_free(level);
}
if (resctrl->monitor_info)
g_strfreev(resctrl->monitor_info->features);
VIR_FREE(resctrl->membw_info);
VIR_FREE(resctrl->levels);
VIR_FREE(resctrl->monitor_info);
g_free(resctrl->membw_info);
g_free(resctrl->levels);
g_free(resctrl->monitor_info);
}
@ -396,30 +396,30 @@ virResctrlAllocDispose(void *obj)
continue;
for (k = 0; k < type->nsizes; k++)
VIR_FREE(type->sizes[k]);
g_free(type->sizes[k]);
for (k = 0; k < type->nmasks; k++)
virBitmapFree(type->masks[k]);
VIR_FREE(type->sizes);
VIR_FREE(type->masks);
VIR_FREE(type);
g_free(type->sizes);
g_free(type->masks);
g_free(type);
}
VIR_FREE(level->types);
VIR_FREE(level);
g_free(level->types);
g_free(level);
}
if (alloc->mem_bw) {
virResctrlAllocMemBWPtr mem_bw = alloc->mem_bw;
for (i = 0; i < mem_bw->nbandwidths; i++)
VIR_FREE(mem_bw->bandwidths[i]);
VIR_FREE(alloc->mem_bw->bandwidths);
VIR_FREE(alloc->mem_bw);
g_free(mem_bw->bandwidths[i]);
g_free(alloc->mem_bw->bandwidths);
g_free(alloc->mem_bw);
}
VIR_FREE(alloc->id);
VIR_FREE(alloc->path);
VIR_FREE(alloc->levels);
g_free(alloc->id);
g_free(alloc->path);
g_free(alloc->levels);
}
@ -429,8 +429,8 @@ virResctrlMonitorDispose(void *obj)
virResctrlMonitorPtr monitor = obj;
virObjectUnref(monitor->alloc);
VIR_FREE(monitor->id);
VIR_FREE(monitor->path);
g_free(monitor->id);
g_free(monitor->path);
}

View File

@ -347,7 +347,7 @@ virSCSIDeviceListDispose(void *obj)
for (i = 0; i < list->count; i++)
virSCSIDeviceFree(list->devs[i]);
VIR_FREE(list->devs);
g_free(list->devs);
}
int

View File

@ -60,7 +60,7 @@ virSCSIVHostDeviceListDispose(void *obj)
for (i = 0; i < list->count; i++)
virSCSIVHostDeviceFree(list->devs[i]);
VIR_FREE(list->devs);
g_free(list->devs);
}

View File

@ -434,7 +434,7 @@ virUSBDeviceListDispose(void *obj)
for (i = 0; i < list->count; i++)
virUSBDeviceFree(list->devs[i]);
VIR_FREE(list->devs);
g_free(list->devs);
}
int