]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix PeerKey deinit behavior
authorJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 12:23:43 +0000 (14:23 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 14:32:54 +0000 (16:32 +0200)
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>

src/rsn_supp/peerkey.c
src/rsn_supp/wpa.c

index 76714f8df5d5cacc892a30bf9518984eff3deff3..cb86dfbcc4a66320385f57a61f5e259684283115 100644 (file)
@@ -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;
 }
index 109d07bed4790f390c1bd116864a0485fa33c76f..d26a7a8b08e7afe2d3f1acd7dfbf85c254d748b5 100644 (file)
@@ -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)