From 37f08bc84843e71bb4859d84bea9b8dd7e0d09dd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 15 Jul 2014 20:10:06 +0200 Subject: [PATCH] core: use gs_free_slist in NMManager Signed-off-by: Thomas Haller --- src/nm-manager.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 5d7149ab70..520654fb4f 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1537,17 +1537,6 @@ done: g_clear_error (&error); } -/* This should really be moved to gsystem. */ -#define free_slist __attribute__ ((cleanup(local_slist_free))) -static void -local_slist_free (void *loc) -{ - GSList **location = loc; - - if (location) - g_slist_free (*location); -} - static gboolean match_connection_filter (NMConnection *connection, gpointer user_data) { @@ -1566,7 +1555,7 @@ static NMConnection * get_existing_connection (NMManager *manager, NMDevice *device) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); - free_slist GSList *connections = nm_manager_get_activatable_connections (manager); + gs_free_slist GSList *connections = nm_manager_get_activatable_connections (manager); NMConnection *connection = NULL, *matched; NMSettingsConnection *added = NULL; GError *error = NULL;