diff --git a/ChangeLog b/ChangeLog index 38cbb2ff0..aa759aabd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-17 Dan Williams + + * src/NetworkManagerPolicy.c + - (auto_activate_device): always remove the current activation check + from the pending activation list, otherwise when the policy gets + destroyed on NM exit it will attempt to free the already freed + activation check + 2008-03-14 Tambet Ingo * src/backends/NetworkManagerSlackware.c diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index ebd25212b..7e3171492 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -184,6 +184,7 @@ auto_activate_device (gpointer user_data) GSList *connections, *iter; g_assert (data); + policy = data->policy; // FIXME: if a device is already activating (or activated) with a connection // but another connection now overrides the current one for that device, @@ -192,8 +193,6 @@ auto_activate_device (gpointer user_data) if (nm_device_get_act_request (data->device)) goto out; - policy = data->policy; - /* System connections first, then user connections */ connections = nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_SYSTEM); connections = g_slist_concat (connections, nm_manager_get_connections (policy->manager, NM_CONNECTION_SCOPE_USER)); @@ -230,13 +229,12 @@ 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_slist_foreach (connections, (GFunc) g_object_unref, NULL); g_slist_free (connections); out: + /* Remove this call's handler ID */ + policy->pending_activation_checks = g_slist_remove (policy->pending_activation_checks, data); g_object_unref (data->device); g_free (data);