]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Clear the target BSS on reset
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 30 Oct 2025 08:24:35 +0000 (09:24 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 13 Dec 2025 19:48:21 +0000 (21:48 +0200)
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@intel.com>
wpa_supplicant/wnm_sta.c

index 1e362e4b9eff65c15c4fca3906093e0dfa2ac3dd..a09f47620bb1950b9bab9abde260dfcf34edd10d 100644 (file)
@@ -439,6 +439,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;