diff --git a/ChangeLog b/ChangeLog index 9f610d5e3..44486ecf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-14 Tambet Ingo + + * src/NetworkManagerPolicy.c (auto_activate_device): Don't leak device and + data. + 2008-03-14 Dan Williams * include/wireless-helper.h diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index 9b089c80b..ebd25212b 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -190,7 +190,7 @@ auto_activate_device (gpointer user_data) // 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 @@ auto_activate_device (gpointer user_data) /* 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; }