diff options
author | Thomas Haller <thaller@redhat.com> | 2018-04-09 17:35:20 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-13 09:09:46 +0200 |
commit | 6ab0939e340d43641093f2e825e3d20b1815b3b2 (patch) | |
tree | 562767bdfc990afd92fc6722b7bcfc94723e6a2d | |
parent | f0bddb44e03aed9d9ca8be0bf63d46dd7ebda15c (diff) | |
download | NetworkManager-6ab0939e340d43641093f2e825e3d20b1815b3b2.tar.gz |
settings: cancel pending authorization requests if connection gets removed
Otherwise, the autorization request might succeed and we would
still do something with the connection that is already removed.
https://bugzilla.redhat.com/show_bug.cgi?id=1565030
-rw-r--r-- | src/settings/nm-settings-connection.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index e72a623e7b..43391cc3f5 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -2276,11 +2276,19 @@ void nm_settings_connection_signal_remove (NMSettingsConnection *self) { NMSettingsConnectionPrivate *priv = NM_SETTINGS_CONNECTION_GET_PRIVATE (self); + GSList *pending_auth; if (priv->removed) return; priv->removed = TRUE; + while ((pending_auth = priv->pending_auths)) { + NMAuthChain *chain = pending_auth->data; + + priv->pending_auths = g_slist_delete_link (priv->pending_auths, pending_auth); + nm_auth_chain_destroy (chain); + } + nm_dbus_object_emit_signal (NM_DBUS_OBJECT (self), &interface_info_settings_connection, &signal_info_removed, |