[PATCH 1/1] nl80211_deinit cancel blocked rfkill timeout

Jouni Malinen j at w1.fi
Tue Apr 29 13:52:33 EDT 2014


On Fri, Apr 25, 2014 at 08:46:03PM -0400, Eduardo Abinader wrote:
> Got segfault, when freeing drv and there exists registered
> timeout for blocked rfkill. This patch adds cancel timeout
> for blocked rfkill.

Thanks, applied.

> diff --git 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)
> +	if (rfkill_is_blocked(drv->rfkill))
> +		eloop_cancel_timeout(wpa_driver_nl80211_send_rfkill, drv, drv->ctx);

Though, I dropped that if (rfkill_is_blocked) part since it is fine to
call eloop_cancel_timeout() without anything matching and that timeout
must not be left behind regardless of what has happened with rfkill
since the drv pointer is freed immediately after this.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list