mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Clear wpa_psk memory when setting up wpa_supplicant AP mode
This is more of a theoretical case since this part is done only during setup and the structure is not allocated in practice. Anyway, maintaining more consistent use of bin_clear_free() for structures that may contain keys is useful. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7d711541dc
commit
ce52d031e5
@ -225,7 +225,7 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
|
||||
bss->wpa_key_mgmt = ssid->key_mgmt;
|
||||
bss->wpa_pairwise = ssid->pairwise_cipher;
|
||||
if (ssid->psk_set) {
|
||||
os_free(bss->ssid.wpa_psk);
|
||||
bin_clear_free(bss->ssid.wpa_psk, sizeof(*bss->ssid.wpa_psk));
|
||||
bss->ssid.wpa_psk = os_zalloc(sizeof(struct hostapd_wpa_psk));
|
||||
if (bss->ssid.wpa_psk == NULL)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user