aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-29 11:11:29 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-29 17:44:51 (GMT)
commit6df19739885be0594390222fdfb59d597c472b65 (patch)
treed249144e7c73f4de44a238e170c9987e5fd8c101 /wpa_supplicant/config.c
parente886c88e95f12e8fd0b354276c5570e3c64afc46 (diff)
downloadhostap-6df19739885be0594390222fdfb59d597c472b65.zip
hostap-6df19739885be0594390222fdfb59d597c472b65.tar.gz
hostap-6df19739885be0594390222fdfb59d597c472b65.tar.bz2
Clear psk_list while freeing config_ssid instances
Previously, the main PSK entry was cleared explicitly, but psk_list could include PSKs for some P2P use cases, so clear it as well when freeing config_ssid instances. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/config.c')
-rw-r--r--wpa_supplicant/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index d3a8c86..f478a04 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2078,7 +2078,6 @@ void wpa_config_free_ssid(struct wpa_ssid *ssid)
struct psk_list_entry *psk;
os_free(ssid->ssid);
- os_memset(ssid->psk, 0, sizeof(ssid->psk));
str_clear_free(ssid->passphrase);
os_free(ssid->ext_psk);
#ifdef IEEE8021X_EAPOL
@@ -2098,9 +2097,9 @@ void wpa_config_free_ssid(struct wpa_ssid *ssid)
while ((psk = dl_list_first(&ssid->psk_list, struct psk_list_entry,
list))) {
dl_list_del(&psk->list);
- os_free(psk);
+ bin_clear_free(psk, sizeof(*psk));
}
- os_free(ssid);
+ bin_clear_free(ssid, sizeof(*ssid));
}