[PATCH 1/1] nl80211_deinit cancel blocked rfkill timeout

Eduardo Abinader eduardo.abinader
Fri Apr 25 17:46:03 PDT 2014


Got segfault, when freeing drv and there exists registered
timeout for blocked rfkill. This patch adds cancel timeout
for blocked rfkill.

Signed-off-by: Eduardo Abinader <eduardo.abinader at openbossa.org>
---
 src/drivers/driver_nl80211.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 1300703..396a937 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4819,6 +4819,10 @@ static void wpa_driver_nl80211_deinit(struct i802_bss *bss)
 
 	netlink_send_oper_ifla(drv->global->netlink, drv->ifindex, 0,
 			       IF_OPER_UP);
+
+	if (rfkill_is_blocked(drv->rfkill))
+		eloop_cancel_timeout(wpa_driver_nl80211_send_rfkill, drv, drv->ctx);
+
 	rfkill_deinit(drv->rfkill);
 
 	eloop_cancel_timeout(wpa_driver_nl80211_scan_timeout, drv, drv->ctx);
-- 
1.8.3.2




More information about the Hostap mailing list