aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-11-22 15:28:04 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-22 16:40:03 (GMT)
commit279b5486a6caad1d5eb69e7a39ebf846546d7d79 (patch)
tree5c87ebf71c5532cca53b55da17566857d6adf7d0 /wpa_supplicant/wnm_sta.c
parent027454d2e921fab41bfc6b3395746e0180b45cdd (diff)
downloadhostap-279b5486a6caad1d5eb69e7a39ebf846546d7d79.zip
hostap-279b5486a6caad1d5eb69e7a39ebf846546d7d79.tar.gz
hostap-279b5486a6caad1d5eb69e7a39ebf846546d7d79.tar.bz2
WNM: Fix TM candidate freeing if multiple requests are processed
The previously cached candidate list needs to be free properly through a call to wnm_deallocate_memory() to ensure all subelements gets freed. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 2ebdaf3..3052314 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -745,8 +745,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
unsigned int valid_ms;
wpa_msg(wpa_s, MSG_INFO, "WNM: Preferred List Available");
- wpa_s->wnm_num_neighbor_report = 0;
- os_free(wpa_s->wnm_neighbor_report_elements);
+ wnm_deallocate_memory(wpa_s);
wpa_s->wnm_neighbor_report_elements = os_zalloc(
WNM_MAX_NEIGHBOR_REPORT *
sizeof(struct neighbor_report));