summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-07-15 20:10:06 +0200
committerThomas Haller <thaller@redhat.com>2014-07-15 22:50:36 +0200
commit37f08bc84843e71bb4859d84bea9b8dd7e0d09dd (patch)
tree8b1d26380a421396a24d9b1733542b06bf9d44cd
parent51bd9425758d0cb9796832c956fb7aaeb2f99272 (diff)
downloadNetworkManager-37f08bc84843e71bb4859d84bea9b8dd7e0d09dd.tar.gz
core: use gs_free_slist in NMManager
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/nm-manager.c13
1 files changed, 1 insertions, 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;