iwd: Disconnect signals in NMDeviceIwd's dispose

Fix a crash on device unplugging caused by keeping our signal handlers
for GDBusProxies connected after a call to dispose().  Do this by
replacing most cleanup steps by a nm_device_iwd_set_dbus_object(self, NULL)
call which is more meticulous.
This commit is contained in:
Andrew Zaborowski 2020-10-06 01:30:26 +02:00 committed by Thomas Haller
parent 7fe76f54e3
commit d2b0c5af63
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -2600,17 +2600,7 @@ dispose(GObject *object)
nm_clear_g_cancellable(&priv->cancellable);
nm_clear_g_source(&priv->periodic_scan_id);
cleanup_association_attempt(self, TRUE);
g_clear_object(&priv->dbus_device_proxy);
g_clear_object(&priv->dbus_station_proxy);
g_clear_object(&priv->dbus_ap_proxy);
g_clear_object(&priv->dbus_adhoc_proxy);
g_clear_object(&priv->dbus_obj);
remove_all_aps(self);
nm_device_iwd_set_dbus_object(self, NULL);
G_OBJECT_CLASS(nm_device_iwd_parent_class)->dispose(object);