]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Clear PMKSA cache entry data when freeing them
authorJouni Malinen <j@w1.fi>
Sat, 4 Oct 2014 18:43:32 +0000 (21:43 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 4 Oct 2014 20:01:08 +0000 (23:01 +0300)
Avoid leaving the PMK information unnecessarily in memory.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/pmksa_cache_auth.c
src/rsn_supp/pmksa_cache.c

index 3bb3eeebf7d6b82c1604eb8ee9d65872a9e79e1f..a0c75c12357ce30de00007c5f3917ef2d277a701 100644 (file)
@@ -42,7 +42,7 @@ static void _pmksa_cache_free_entry(struct rsn_pmksa_cache_entry *entry)
 #ifndef CONFIG_NO_RADIUS
        radius_free_class(&entry->radius_class);
 #endif /* CONFIG_NO_RADIUS */
-       os_free(entry);
+       bin_clear_free(entry, sizeof(*entry));
 }
 
 
index b5a87fc52fea28d7fb3a932add2cf0a72967ec07..885291a2390eb392ccb3dee3431e0989706fccb1 100644 (file)
@@ -35,7 +35,7 @@ static void pmksa_cache_set_expiration(struct rsn_pmksa_cache *pmksa);
 
 static void _pmksa_cache_free_entry(struct rsn_pmksa_cache_entry *entry)
 {
-       os_free(entry);
+       bin_clear_free(entry, sizeof(*entry));
 }