diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h index c8017c69ce..bbab3a01b5 100644 --- a/shared/nm-glib-aux/nm-macros-internal.h +++ b/shared/nm-glib-aux/nm-macros-internal.h @@ -98,15 +98,6 @@ NM_AUTO_DEFINE_FCN0 (GPtrArray *, gs_local_ptrarray_unref, g_ptr_array_unref); #define gs_unref_hashtable nm_auto(gs_local_hashtable_unref) NM_AUTO_DEFINE_FCN0 (GHashTable *, gs_local_hashtable_unref, g_hash_table_unref); -/** - * gs_free_slist: - * - * Call g_slist_free() on a variable location when it goes out - * of scope. - */ -#define gs_free_slist nm_auto(gs_local_free_slist) -NM_AUTO_DEFINE_FCN0 (GSList *, gs_local_free_slist, g_slist_free); - /** * gs_unref_bytes: * diff --git a/src/nm-config.c b/src/nm-config.c index 06e36b71ae..66e8352eca 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -1020,8 +1020,8 @@ read_config (GKeyFile *keyfile, } else { gs_free char *old_sval = nm_config_keyfile_get_value (keyfile, group, base_key, NM_CONFIG_GET_VALUE_TYPE_SPEC); gs_free char *new_sval = nm_config_keyfile_get_value (kf, group, key, NM_CONFIG_GET_VALUE_TYPE_SPEC); - gs_free_slist GSList *old_specs = nm_match_spec_split (old_sval); - gs_free_slist GSList *new_specs = nm_match_spec_split (new_sval); + nm_auto_free_slist GSList *old_specs = nm_match_spec_split (old_sval); + nm_auto_free_slist GSList *new_specs = nm_match_spec_split (new_sval); /* the key is a device spec. This is a special kind of string-list, that * we must split differently. */ @@ -1049,7 +1049,7 @@ read_config (GKeyFile *keyfile, if (is_string_list) nm_config_keyfile_set_string_list (keyfile, group, base_key, (const char *const*) new->pdata, new->len); else { - gs_free_slist GSList *specs = NULL; + nm_auto_free_slist GSList *specs = NULL; gs_free char *specs_joined = NULL; g_ptr_array_add (new, NULL); diff --git a/src/tests/test-core.c b/src/tests/test-core.c index 792a4a57ab..03fd679f94 100644 --- a/src/tests/test-core.c +++ b/src/tests/test-core.c @@ -801,7 +801,7 @@ test_connection_match_ip4_routes1 (void) { gs_unref_object NMConnection *orig = NULL, *copy = NULL; NMConnection *matched; - gs_free_slist GSList *connections = NULL; + nm_auto_free_slist GSList *connections = NULL; NMSettingIPConfig *s_ip4; orig = _match_connection_new (); @@ -837,7 +837,7 @@ test_connection_match_ip4_routes2 (void) { gs_unref_object NMConnection *orig = NULL, *copy = NULL; NMConnection *matched; - gs_free_slist GSList *connections = NULL; + nm_auto_free_slist GSList *connections = NULL; NMSettingIPConfig *s_ip4; orig = _match_connection_new (); @@ -876,7 +876,7 @@ test_connection_match_ip6_routes (void) { gs_unref_object NMConnection *orig = NULL, *copy = NULL; NMConnection *matched; - gs_free_slist GSList *connections = NULL; + nm_auto_free_slist GSList *connections = NULL; NMSettingIPConfig *s_ip6; orig = _match_connection_new ();