NetworkManager r3237 - in trunk: . libnm-glib



Author: dcbw
Date: Mon Jan 14 03:23:29 2008
New Revision: 3237
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3237&view=rev

Log:
2008-01-13  Dan Williams  <dcbw redhat com>

	* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_access_points): fix memory leak



Modified:
   trunk/ChangeLog
   trunk/libnm-glib/nm-device-802-11-wireless.c

Modified: trunk/libnm-glib/nm-device-802-11-wireless.c
==============================================================================
--- trunk/libnm-glib/nm-device-802-11-wireless.c	(original)
+++ trunk/libnm-glib/nm-device-802-11-wireless.c	Mon Jan 14 03:23:29 2008
@@ -306,9 +306,11 @@
 		int i;
 
 		for (i = 0; i < array->len; i++) {
-			NMAccessPoint *ap = get_access_point (device, (const char *) g_ptr_array_index (array, i), TRUE);
+			char *path = (char *) g_ptr_array_index (array, i);
+			NMAccessPoint *ap = get_access_point (device, (const char *) path, TRUE);
 			if (ap)
 				list = g_slist_prepend (list, ap);
+			g_free (path);
 		}
 
 		g_ptr_array_free (array, TRUE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]