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>
This commit is contained in:
Jouni Malinen 2019-02-05 20:25:21 +02:00 committed by Jouni Malinen
parent 43e3114c5f
commit 8f99a3c26a

View file

@ -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);
}