diff --git a/src/wiphy.c b/src/wiphy.c index 7e68c82d..37ee31fe 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -2147,6 +2147,8 @@ static void nl80211_vanished(void *user_data) { l_debug("Lost nl80211 interface"); + scan_exit(); + l_queue_destroy(wiphy_list, wiphy_free); wiphy_list = NULL; } @@ -2199,6 +2201,8 @@ bool wiphy_exit(void) l_debug("Closing nl80211 interface"); + scan_exit(); + /* * The generic netlink master object keeps track of all families * and closing it will take care of freeing all associated resources.