mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 14:50:07 +01:00
secret-agent: fix leak of @dbus_owner
The @dbus_owner field was only cleaned up when the
proxy disconnected and leaked otherwise.
Also, don't clear @dbus_owner together with the proxy.
Otherwise, get_description() might yield different results
after the proxy got cleared. That can lead to problems because
NMAgentManager tracks the secrets agents by their "dbus-owner" --
IOW, NMAgentManager uses the "dbus-owner" as identifer for the
secret agent. Thus it must not change.
Fixes: 2a2fd1216b
This commit is contained in:
parent
6bcc1eda0b
commit
8ed98a381b
1 changed files with 1 additions and 2 deletions
|
|
@ -470,8 +470,6 @@ name_owner_changed_cb (GObject *proxy,
|
|||
g_signal_handlers_disconnect_by_func (priv->proxy, name_owner_changed_cb, self);
|
||||
g_clear_object (&priv->proxy);
|
||||
g_signal_emit (self, signals[DISCONNECTED], 0);
|
||||
|
||||
g_clear_pointer (&priv->dbus_owner, g_free);
|
||||
} else
|
||||
g_free (owner);
|
||||
}
|
||||
|
|
@ -555,6 +553,7 @@ finalize (GObject *object)
|
|||
g_free (priv->description);
|
||||
g_free (priv->identifier);
|
||||
g_free (priv->owner_username);
|
||||
g_free (priv->dbus_owner);
|
||||
|
||||
g_slist_free_full (priv->permissions, g_free);
|
||||
g_hash_table_destroy (priv->requests);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue