mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 08:50:12 +01:00
settings: fix clearing agent-manager in NMSettings' dispose()
dispose() should be re-entrant. When releasing a resource, it must not leave a dangling pointer. While at it, just move it to finalize() instead.
This commit is contained in:
parent
a92543d3b7
commit
e41db3fa55
1 changed files with 2 additions and 2 deletions
|
|
@ -1915,8 +1915,6 @@ dispose (GObject *object)
|
|||
g_slist_free_full (priv->auths, (GDestroyNotify) nm_auth_chain_destroy);
|
||||
priv->auths = NULL;
|
||||
|
||||
g_object_unref (priv->agent_mgr);
|
||||
|
||||
if (priv->hostname_manager) {
|
||||
g_signal_handlers_disconnect_by_func (priv->hostname_manager,
|
||||
G_CALLBACK (_hostname_changed_cb),
|
||||
|
|
@ -1942,6 +1940,8 @@ finalize (GObject *object)
|
|||
|
||||
g_slist_free_full (priv->plugins, g_object_unref);
|
||||
|
||||
g_clear_object (&priv->agent_mgr);
|
||||
|
||||
g_clear_object (&priv->config);
|
||||
|
||||
G_OBJECT_CLASS (nm_settings_parent_class)->finalize (object);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue