mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 03:40:16 +01:00
settings: disconnect signals from plugins when destroying NMSettings
Currently we anyway leak everything on shutdown, so this doesn't matter. But to be correct, we must disconnect signal handlers.
This commit is contained in:
parent
657b0714b8
commit
dd5244af3e
1 changed files with 7 additions and 1 deletions
|
|
@ -1918,6 +1918,7 @@ finalize (GObject *object)
|
|||
{
|
||||
NMSettings *self = NM_SETTINGS (object);
|
||||
NMSettingsPrivate *priv = NM_SETTINGS_GET_PRIVATE (self);
|
||||
GSList *iter;
|
||||
|
||||
_clear_connections_cached_list (priv);
|
||||
|
||||
|
|
@ -1926,7 +1927,12 @@ finalize (GObject *object)
|
|||
g_slist_free_full (priv->unmanaged_specs, g_free);
|
||||
g_slist_free_full (priv->unrecognized_specs, g_free);
|
||||
|
||||
g_slist_free_full (priv->plugins, g_object_unref);
|
||||
while ((iter = priv->plugins)) {
|
||||
gs_unref_object NMSettingsPlugin *plugin = iter->data;
|
||||
|
||||
priv->plugins = g_slist_delete_link (priv->plugins, iter);
|
||||
g_signal_handlers_disconnect_by_data (plugin, self);
|
||||
}
|
||||
|
||||
g_clear_object (&priv->agent_mgr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue