aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-02-05 18:25:21 (GMT)
committerJouni Malinen <j@w1.fi>2019-02-05 18:26:22 (GMT)
commit8f99a3c26ace5789e515944a09beb3081f7fbee2 (patch)
treec7154b8e17a63f9ab4e3ad55ab5b2b4259cee6fc
parent43e3114c5f5acf5958d2cbac110616412cc9e14f (diff)
downloadhostap-8f99a3c26ace5789e515944a09beb3081f7fbee2.zip
hostap-8f99a3c26ace5789e515944a09beb3081f7fbee2.tar.gz
hostap-8f99a3c26ace5789e515944a09beb3081f7fbee2.tar.bz2
Clear config item writing buffer before freeing it
This buffer may be used to store items like passwords, so better clean it explicitly to avoid possibility of leaving such items in heap memory unnecessarily. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--wpa_supplicant/config_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 9b14699..f1d865c 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -493,7 +493,7 @@ static void write_str(FILE *f, const char *field, struct wpa_ssid *ssid)
if (value == NULL)
return;
fprintf(f, "\t%s=%s\n", field, value);
- os_free(value);
+ str_clear_free(value);
}