diff mbox series

[2/7] hostapd: cancel channel_list_update_timeout in hostapd_cleanup_iface_partial

Message ID 20240404105217.12478-2-nbd@nbd.name
State Accepted
Headers show
Series [1/7] driver_nl80211: update drv->ifindex on removing the first BSS | expand

Commit Message

Felix Fietkau April 4, 2024, 10:52 a.m. UTC
Fixes a crash when disabling an interface during channel list update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 src/ap/hostapd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index f8cb6432d007..7ea65d654db3 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -685,6 +685,7 @@  static void sta_track_deinit(struct hostapd_iface *iface)
 void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
 {
 	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
+	eloop_cancel_timeout(channel_list_update_timeout, iface, NULL);
 #ifdef NEED_AP_MLME
 	hostapd_stop_setup_timers(iface);
 #endif /* NEED_AP_MLME */
@@ -714,7 +715,6 @@  void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
 static void hostapd_cleanup_iface(struct hostapd_iface *iface)
 {
 	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
-	eloop_cancel_timeout(channel_list_update_timeout, iface, NULL);
 	eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
 			     NULL);