summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2014-10-31 15:44:31 +0100
committerLubomir Rintel <lkundrak@v3.sk>2014-10-31 15:44:31 +0100
commit4f9e2e960372fa116931bcc06563a9c3c638dbd7 (patch)
tree39c0fa9289f548c7507fe7c5b8d8f90703bf4bee
parent1f275a980a4f649d3f8fe21d0e6b54718c404dfc (diff)
downloadNetworkManager-4f9e2e960372fa116931bcc06563a9c3c638dbd7.tar.gz
libnm: Fix a nm_running_changed race
Unhook the nm_running_changed signal, so that it does not attempt to free connections after they've been disposed already. https://bugzilla.gnome.org/show_bug.cgi?id=739127
-rw-r--r--libnm/nm-remote-settings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnm/nm-remote-settings.c b/libnm/nm-remote-settings.c
index 351fbc1bd2..a37cbe9f8b 100644
--- a/libnm/nm-remote-settings.c
+++ b/libnm/nm-remote-settings.c
@@ -681,7 +681,7 @@ init_dbus (NMObject *object)
property_info);
g_signal_connect (object, "notify::" NM_OBJECT_NM_RUNNING,
- G_CALLBACK (nm_running_changed), NULL);
+ G_CALLBACK (nm_running_changed), object);
}
static GObject *
@@ -727,6 +727,8 @@ dispose (GObject *object)
g_clear_pointer (&priv->all_connections, g_ptr_array_unref);
}
+ g_signal_handlers_disconnect_by_func (object, G_CALLBACK (nm_running_changed), self);
+
g_clear_pointer (&priv->visible_connections, g_ptr_array_unref);
g_clear_pointer (&priv->hostname, g_free);