[PATCH v2 2/3] hostapd: ap: add AFC client support

William Ross-Ashikyan washikyan at maxlinear.com
Mon Mar 4 10:21:46 PST 2024


>@@ -2847,6 +2857,10 @@ void hostapd_interface_free(struct hostapd_iface *iface)
>                os_free(iface->bss[j]);
>        }
>        hostapd_cleanup_iface(iface);
>+#ifdef CONFIG_AFC
>+       os_free(iface->afc.chan_info_list);
>+       os_free(iface->afc.freq_range);
>+#endif
> }
>
>

Inside your addition to hostapd_interface_free(struct hostapd_iface *iface) you try freeing the afc channel and frequency arrays AFTER hostapd_cleanup_iface(iface), which contains an os_free(iface) call, which will then cause a dereference to a null pointer if accessed afterwards. Please move your #ifdef CONFIG_AFC section BEFORE the hostapd_cleanup_iface(iface) call and you should be fine.

Regards,
William



More information about the Hostap mailing list