vpn: disconnect signal handlers from proxy in NMVpnConnection::dispose()

We cannot be sure who holds a reference to the proxy, and
who is gonna call us back after the VPN connection instance
is destroyed.

(cherry picked from commit 6ebb9091d2)
This commit is contained in:
Thomas Haller 2018-09-14 14:11:48 +02:00
parent 011dd919fa
commit f71f9b54a8

View file

@ -2760,6 +2760,9 @@ dispose (GObject *object)
NMVpnConnection *self = NM_VPN_CONNECTION (object);
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
if (priv->proxy)
g_signal_handlers_disconnect_by_data (priv->proxy, self);
nm_clear_g_source (&priv->start_timeout);
g_clear_pointer (&priv->connect_hash, g_variant_unref);