From fbcdafef3b8e8b81308ccc51bd6b2610a7321aa3 Mon Sep 17 00:00:00 2001 From: Robert Love Date: Mon, 6 Feb 2006 18:26:41 +0000 Subject: [PATCH] 2006-02-06 Robert Love * src/nm-device-802-11-wireless.c: Fix leak in supplicant_status_cb(). git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1456 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 8 ++++++-- src/nm-device-802-11-wireless.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b05905638c..187adec157 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ +2006-02-06 Robert Love + + * src/nm-device-802-11-wireless.c: Fix leak in supplicant_status_cb(). + 2006-02-06 Robert Love * src/NetworkManagerUtils.c: kill_newline(): 'l' is unsigned so the test ">=" is never false. If no newline is found, we loop forever. - We can just check for ">" because the following if will see zero-th - argument if the while gets that far. + We can just check for ">" because the following if() will see the + zero-th argument if the while() gets that far. 2006-02-05 Dan Williams diff --git a/src/nm-device-802-11-wireless.c b/src/nm-device-802-11-wireless.c index f3e27202e2..9615bb2fd1 100644 --- a/src/nm-device-802-11-wireless.c +++ b/src/nm-device-802-11-wireless.c @@ -43,8 +43,6 @@ #include "wpa_ctrl.h" #include "cipher.h" -#define NM_SUPPLICANT_TIMEOUT 20 /* how long we wait for wpa_supplicant to associate (in seconds) */ - /* #define IW_QUAL_DEBUG */ #define NM_DEVICE_802_11_WIRELESS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_802_11_WIRELESS, NMDevice80211WirelessPrivate)) @@ -2201,9 +2199,14 @@ supplicant_status_cb (GIOChannel *source, } } + g_free (message); + return TRUE; } + +#define NM_SUPPLICANT_TIMEOUT 20 /* how long we wait for wpa_supplicant to associate (in seconds) */ + static unsigned int get_supplicant_timeout (NMDevice80211Wireless *self) { @@ -2212,6 +2215,7 @@ get_supplicant_timeout (NMDevice80211Wireless *self) return NM_SUPPLICANT_TIMEOUT; } + static gboolean supplicant_timeout_cb (gpointer user_data) {