NetworkManager r3463 - in trunk: . src



Author: tambeti
Date: Fri Mar 14 21:42:03 2008
New Revision: 3463
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3463&view=rev

Log:
2008-03-14 Tambet Ingo <tambet gmail com>

	* src/NetworkManagerPolicy.c (auto_activate_device): Don't leak device and
	data.


Modified:
   trunk/ChangeLog
   trunk/src/NetworkManagerPolicy.c

Modified: trunk/src/NetworkManagerPolicy.c
==============================================================================
--- trunk/src/NetworkManagerPolicy.c	(original)
+++ trunk/src/NetworkManagerPolicy.c	Fri Mar 14 21:42:03 2008
@@ -190,7 +190,7 @@
 	// deactivate the device and activate the new connection instead of just
 	// bailing if the device is already active
 	if (nm_device_get_act_request (data->device))
-		return FALSE;
+		goto out;
 
 	policy = data->policy;
 
@@ -233,12 +233,13 @@
 	/* Remove this call's handler ID */
 	policy->pending_activation_checks = g_slist_remove (policy->pending_activation_checks, data);
 
-	g_object_unref (data->device);
-
 	g_slist_foreach (connections, (GFunc) g_object_unref, NULL);
 	g_slist_free (connections);
 
+ out:
+	g_object_unref (data->device);
 	g_free (data);
+
 	return FALSE;
 }
 



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