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:
parent
43e3114c5f
commit
8f99a3c26a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue