From: Benjamin Berg Date: Thu, 30 Oct 2025 08:24:35 +0000 (+0100) Subject: WNM: Clear the target BSS on reset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0abdd556a741b890f2eba3d7f7d4f72d5fb4435;p=thirdparty%2Fhostap.git WNM: Clear the target BSS on reset 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 --- diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 1e362e4b9..a09f47620 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -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;