2007-08-15 Dan Williams <dcbw@redhat.com>

* libnm-glib/nm-client.c
		- (nm_client_get_best_vpn_state): fix leakage of the vpn connection list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2696 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-08-15 16:25:48 +00:00
parent b1e15de652
commit e2ca9c32f3
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2007-08-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
- (nm_client_get_best_vpn_state): fix leakage of the vpn connection list
2007-08-15 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager: Implement ppp-manager. It's sort of dead code for now since

View file

@ -508,15 +508,17 @@ nm_client_sleep (NMClient *client, gboolean sleep)
static NMVPNConnectionState
nm_client_get_best_vpn_state (NMClient *client)
{
GSList *iter;
GSList *iter, *list;
NMVPNConnectionState state;
NMVPNConnectionState best_state = NM_VPN_CONNECTION_STATE_UNKNOWN;
for (iter = nm_client_get_vpn_connections (client); iter; iter = iter->next) {
list = nm_client_get_vpn_connections (client);
for (iter = list; iter; iter = iter->next) {
state = nm_vpn_connection_get_state (NM_VPN_CONNECTION (iter->data));
if (state > best_state && state < NM_VPN_CONNECTION_STATE_FAILED)
best_state = state;
}
g_slist_free (list);
return best_state;
}