hostapd_free_hapd_data() skips hostapd_ucode_free_bss()/hostapd_ubus_free_bss()
for a bss that never started, so bss.delete() on such a bss freed hapd while
the ucode registry entry and ubus object still referenced it. Call both
explicitly before os_free(); they are idempotent for the started case.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
hostapd_drv_stop_ap(hapd);
hostapd_bss_deinit(hapd);
+ /* deinit skips these for a bss that never started; both are idempotent */
+ hostapd_ucode_free_bss(hapd);
+ hostapd_ubus_free_bss(hapd);
hostapd_remove_iface_bss_conf(iface->conf, hapd->conf);
hostapd_config_free_bss(hapd->conf);
#ifdef CONFIG_IEEE80211BE