diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-29 16:53:12 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-13 09:09:46 +0200 |
commit | 7595b4f1c7d074e9f6c4dc28e58fcaa627fa02a9 (patch) | |
tree | 74ccc884379e4166b1feca0ec56ba5aecc7813c8 | |
parent | 1f3b47deea84888813ed482f5b3e75292b0f2726 (diff) | |
download | NetworkManager-7595b4f1c7d074e9f6c4dc28e58fcaa627fa02a9.tar.gz |
settings: don't let connection keep NMSettings alive
NMSettings already references NMSettingsConnection. Hence, it should not
at the same time reference itself. Arguably, during shutdown we do not properly
release all NMSettingsConnection. For example, there is no nm_settings_stop().
But that is a bug that needs fixing.
No need to keep the NMSettings instance alive here. If this is really
necessary, it needs fixing somewhere else. Besides, we know that we leak
a lot during shutdown, so this needs more work to do a clean shutdown.
-rw-r--r-- | src/settings/nm-settings.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index e3a9fd4c19..ae3f4e933c 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -878,7 +878,6 @@ connection_removed (NMSettingsConnection *connection, gpointer user_data) g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (connection_flags_changed), self); if (!priv->startup_complete) g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (connection_ready_changed), self); - g_object_unref (self); _clear_connections_cached_list (&priv->connections_cached_list); @@ -1000,7 +999,6 @@ claim_connection (NMSettings *self, NMSettingsConnection *connection) /* Evil openconnect migration hack */ openconnect_migrate_hack (NM_CONNECTION (connection)); - g_object_ref (self); /* This one unexports the connection, it needs to run late to give the active * connection a chance to deal with its reference to this settings connection. */ g_signal_connect_after (connection, NM_SETTINGS_CONNECTION_REMOVED, |