From a9e72390e813e0997e58d76fabfb8fd135ef6f20 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Wed, 3 Feb 2021 14:40:30 -0500 Subject: [PATCH] security: replace VIR_FREE with g_free in all vir*Free() functions Signed-off-by: Laine Stump Reviewed-by: Daniel Henrique Barboza --- src/security/security_dac.c | 8 ++++---- src/security/security_selinux.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 389d1dac51..00eeae0d27 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -141,12 +141,12 @@ virSecurityDACChownListFree(void *opaque) return; for (i = 0; i < list->nItems; i++) { - VIR_FREE(list->items[i]->path); - VIR_FREE(list->items[i]); + g_free(list->items[i]->path); + g_free(list->items[i]); } - VIR_FREE(list->items); + g_free(list->items); virObjectUnref(list->manager); - VIR_FREE(list); + g_free(list); } diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 8cc30a0e72..1d1d9edfff 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -108,9 +108,9 @@ virSecuritySELinuxContextItemFree(virSecuritySELinuxContextItemPtr item) if (!item) return; - VIR_FREE(item->path); - VIR_FREE(item->tcon); - VIR_FREE(item); + g_free(item->path); + g_free(item->tcon); + g_free(item); } static int @@ -152,9 +152,9 @@ virSecuritySELinuxContextListFree(void *opaque) for (i = 0; i < list->nItems; i++) virSecuritySELinuxContextItemFree(list->items[i]); - VIR_FREE(list->items); + g_free(list->items); virObjectUnref(list->manager); - VIR_FREE(list); + g_free(list); }