From 0531e9ab083431e9bc3ba51073e799b8e7800735 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 28 Apr 2021 12:40:12 -0700 Subject: [PATCH] station: remove diagnostic interface on station_free If station gets removed ungracefully (e.g. rfkill/hotplug) it may not have a chance to disconnect, meaning the diagnostic interface would remain up. --- src/station.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/station.c b/src/station.c index ed2dcd61..c89b1901 100644 --- a/src/station.c +++ b/src/station.c @@ -3496,6 +3496,10 @@ static void station_free(struct station *station) if (station->connected_bss) netdev_disconnect(station->netdev, NULL, NULL); + l_dbus_object_remove_interface(dbus_get_bus(), + netdev_get_path(station->netdev), + IWD_STATION_DIAGNOSTIC_INTERFACE); + if (station->netconfig) { netconfig_destroy(station->netconfig); station->netconfig = NULL;