From df56b5485d36e8cf2394e581db9f706c17935b99 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 15 Feb 2008 23:17:44 +0000 Subject: [PATCH] 2008-02-15 Dan Williams * src/nm-device-802-11-wireless.c - (device_cleanup): release the AP list here too so that the AP list doesn't survive across suspend/resume and up/down. There is some room for optimization, for example blow the list away when the card brought back up, but only if the device has only been down for a minute or more. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 9 +++++++++ src/nm-device-802-11-wireless.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index aa30a6dd0..55fbdb3a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-02-15 Dan Williams + + * src/nm-device-802-11-wireless.c + - (device_cleanup): release the AP list here too so that the AP list + doesn't survive across suspend/resume and up/down. There is some + room for optimization, for example blow the list away when the card + brought back up, but only if the device has only been down for a + minute or more. + 2008-02-15 Dan Williams * src/nm-hal-manager.c diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index 4705dbf7f..b2496421a 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -761,6 +761,12 @@ device_cleanup (NMDevice80211Wireless *self) g_object_unref (priv->supplicant.mgr); priv->supplicant.mgr = NULL; } + + g_slist_foreach (self->priv->ap_list, (GFunc) g_object_unref, NULL); + g_slist_free (self->priv->ap_list); + self->priv->ap_list = NULL; + + set_current_ap (self, NULL); } static void