aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-28 12:23:43 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-28 14:32:54 (GMT)
commit773272989a71f772ee675bd7e92c131aaa323903 (patch)
tree635f88cd040205cd23115599d343936d3c317863 /src
parent4472aafbe0d9437ffa2739fb3de94778dfe9250b (diff)
downloadhostap-773272989a71f772ee675bd7e92c131aaa323903.zip
hostap-773272989a71f772ee675bd7e92c131aaa323903.tar.gz
hostap-773272989a71f772ee675bd7e92c131aaa323903.tar.bz2
Fix PeerKey deinit behavior
PeerKey entries need to be removed on disassociation and this needs to be done in a way that cancels the possibly pending eloop timeout. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/rsn_supp/peerkey.c2
-rw-r--r--src/rsn_supp/wpa.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/rsn_supp/peerkey.c b/src/rsn_supp/peerkey.c
index 76714f8..cb86dfb 100644
--- a/src/rsn_supp/peerkey.c
+++ b/src/rsn_supp/peerkey.c
@@ -1110,7 +1110,7 @@ void peerkey_deinit(struct wpa_sm *sm)
while (peerkey) {
prev = peerkey;
peerkey = peerkey->next;
- os_free(prev);
+ wpa_supplicant_peerkey_free(sm, prev);
}
sm->peerkey = NULL;
}
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 109d07b..d26a7a8 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -2098,6 +2098,7 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
*/
void wpa_sm_notify_disassoc(struct wpa_sm *sm)
{
+ peerkey_deinit(sm);
rsn_preauth_deinit(sm);
pmksa_cache_clear_current(sm);
if (wpa_sm_get_state(sm) == WPA_4WAY_HANDSHAKE)