manager: fix a couple of memory leaks
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 21 Jan 2016 17:16:01 +0000 (18:16 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Thu, 21 Jan 2016 17:23:53 +0000 (18:23 +0100)
Fixes: 4dbaac4ba24ebc8b257fffe5197cc8e362804a58
Fixes: d8e1590c5058de91126bfa790c27aea944a2b596

src/nm-manager.c

index ffc89ec..42d4b0a 100644 (file)
@@ -1025,7 +1025,8 @@ system_create_virtual_device (NMManager *self, NMConnection *connection)
 {
        NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
        NMDeviceFactory *factory;
-       GSList *connections, *iter;
+       gs_free_slist GSList *connections = NULL;
+       GSList *iter;
        gs_free char *iface = NULL;
        NMDevice *device = NULL, *parent = NULL;
        GError *error = NULL;
@@ -1137,6 +1138,8 @@ retry_connections_for_parent_device (NMManager *self, NMDevice *device)
                if (parent == device)
                        connection_changed (priv->settings, candidate, self);
        }
+
+       g_slist_free (connections);
 }
 
 static void