[PATCH 04/18] WNM: Clear the target BSS on reset
Benjamin Berg
benjamin at sipsolutions.net
Thu Oct 30 01:24:35 PDT 2025
From: Benjamin Berg <benjamin.berg at intel.com>
Otherwise it might never be cleared in some cases and the BSS has to be
kept alive even though it is not needed anymore. This can result in a
memory leak at shutdown.
Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
---
wpa_supplicant/wnm_sta.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 9c8f37aeb9..97e43daa83 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -430,6 +430,8 @@ void wnm_btm_reset(struct wpa_supplicant *wpa_s)
os_free(wpa_s->wnm_neighbor_report_elements);
wpa_s->wnm_neighbor_report_elements = NULL;
+ wpa_s->wnm_target_bss = NULL;
+
wpa_s->wnm_cand_valid_until.sec = 0;
wpa_s->wnm_cand_valid_until.usec = 0;
--
2.51.0
More information about the Hostap
mailing list