mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 14:48:10 +02:00
ifnet: fix memory leak
This commit is contained in:
parent
28b17c8b4f
commit
856a1c6b2c
1 changed files with 4 additions and 3 deletions
|
|
@ -404,17 +404,18 @@ ifnet_get_global_data (const gchar * key)
|
||||||
|
|
||||||
// Return names of legal connections
|
// Return names of legal connections
|
||||||
GList *
|
GList *
|
||||||
ifnet_get_connection_names ()
|
ifnet_get_connection_names (void)
|
||||||
{
|
{
|
||||||
GList *names = g_hash_table_get_keys (conn_table);
|
GList *names = g_hash_table_get_keys (conn_table);
|
||||||
GList *result = NULL;
|
GList *result = NULL;
|
||||||
|
|
||||||
while (names) {
|
while (names) {
|
||||||
if (!ignore_connection_name (names->data))
|
if (!ignore_connection_name (names->data))
|
||||||
result = g_list_append (result, names->data);
|
result = g_list_prepend (result, names->data);
|
||||||
names = names->next;
|
names = names->next;
|
||||||
}
|
}
|
||||||
return result;
|
g_list_free (names);
|
||||||
|
return g_list_reverse (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* format IP and route for writing */
|
/* format IP and route for writing */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue