From 2a3b3ca38de600c42bd58a039b30e81cb5169d2c Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 6 Oct 2020 01:30:26 +0200 Subject: [PATCH] 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. (cherry picked from commit d2b0c5af6378adbb0fb3c47fea41d2ddd17a6a50) --- src/devices/wifi/nm-device-iwd.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c index fb113f8373..4ec3e1cc7b 100644 --- a/src/devices/wifi/nm-device-iwd.c +++ b/src/devices/wifi/nm-device-iwd.c @@ -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);