From d01f063c39a96c87b8afee6d942e0e0b410e5aa9 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 15 Oct 2020 15:09:11 +0100 Subject: [PATCH] libmalcontent-ui: Add g_autolist() to simplify memory management This introduces no functional changes. Signed-off-by: Philip Withnall --- libmalcontent-ui/restrict-applications-selector.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libmalcontent-ui/restrict-applications-selector.c b/libmalcontent-ui/restrict-applications-selector.c index b27418f..ef55d9f 100644 --- a/libmalcontent-ui/restrict-applications-selector.c +++ b/libmalcontent-ui/restrict-applications-selector.c @@ -389,7 +389,8 @@ app_compare_id_length_cb (gconstpointer a, static void reload_apps (MctRestrictApplicationsSelector *self) { - GList *iter, *apps; + g_autolist(GAppInfo) apps = NULL; + GList *iter; g_autoptr(GHashTable) seen_flatpak_ids = NULL; g_autoptr(GHashTable) seen_executables = NULL; @@ -485,8 +486,6 @@ reload_apps (MctRestrictApplicationsSelector *self) compare_app_info_cb, self); } - - g_list_free_full (apps, g_object_unref); } static void