This was reported by ASAN, the bss variable was just freed a bit
earlier.
Fixes: c6ff28cb63a5 ("AP MLD: Handle garbage pointer after MLD interface is deleted")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
drv->ctx = bss->ctx;
if (!bss->valid_links) {
+ void *ctx = bss->ctx;
+
wpa_printf(MSG_DEBUG,
"nl80211: No more links remaining, so remove interface");
ret = wpa_driver_nl80211_if_remove(bss, type, ifname);
return ret;
/* Notify that the MLD interface is removed */
- wpa_supplicant_event(bss->ctx, EVENT_MLD_INTERFACE_FREED, NULL);
+ wpa_supplicant_event(ctx, EVENT_MLD_INTERFACE_FREED, NULL);
}
return 0;