summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-09-21 14:30:02 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-09-22 08:21:54 +0200
commitdd8c3ef3a005613b5a28dd084bdae54dffa203fd (patch)
tree0fe356cee93e14fb923ece5d2b552c90827f216c
parentf0ea0cd40274a7347a2c007941df02d597641e9c (diff)
downloadNetworkManager-dd8c3ef3a005613b5a28dd084bdae54dffa203fd.tar.gz
manager: disconnect signal handlers on 'settings' in dispose() (rh #1264676)
Otherwise a crash can occur when shutting down. https://bugzilla.redhat.com/show_bug.cgi?id=1264676
-rw-r--r--src/nm-manager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 963ccd85ca..148ccf7ba7 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -5183,7 +5183,16 @@ dispose (GObject *object)
g_clear_object (&priv->policy);
}
- g_clear_object (&priv->settings);
+ if (priv->settings) {
+ g_signal_handlers_disconnect_by_func (priv->settings, settings_startup_complete_changed, manager);
+ g_signal_handlers_disconnect_by_func (priv->settings, system_unmanaged_devices_changed_cb, manager);
+ g_signal_handlers_disconnect_by_func (priv->settings, system_hostname_changed_cb, manager);
+ g_signal_handlers_disconnect_by_func (priv->settings, connection_added, manager);
+ g_signal_handlers_disconnect_by_func (priv->settings, connection_changed, manager);
+ g_signal_handlers_disconnect_by_func (priv->settings, connection_removed, manager);
+ g_clear_object (&priv->settings);
+ }
+
g_free (priv->state_file);
g_clear_object (&priv->vpn_manager);