aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-05-14 13:46:38 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-14 13:46:38 (GMT)
commit0af2db74787394465edb9ae011e52c2bce33d1c0 (patch)
treea7efef7e749c221ed77886fe0d51cf0486665881 /src/utils
parent455299fb40d79bcbeaedcfbc04d00ac8330bbbdd (diff)
downloadhostap-0af2db74787394465edb9ae011e52c2bce33d1c0.zip
hostap-0af2db74787394465edb9ae011e52c2bce33d1c0.tar.gz
hostap-0af2db74787394465edb9ae011e52c2bce33d1c0.tar.bz2
edit: Fix libreadline history clearing with WPA_TRACE
The HIST_ENTRY and its variables are allocated within libreadline, so they won't have the WPA_TRACE special header and cannot be freed with os_free(). Use free() to avoid issues during wpa_cli termination if any of the new commands added to the history are to be removed (e.g., set_network could include a password). Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/edit_readline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/edit_readline.c b/src/utils/edit_readline.c
index add26fa..c2a5bca 100644
--- a/src/utils/edit_readline.c
+++ b/src/utils/edit_readline.c
@@ -167,9 +167,9 @@ void edit_deinit(const char *history_file,
if (filter_cb && filter_cb(edit_cb_ctx, p)) {
h = remove_history(where_history());
if (h) {
- os_free(h->line);
+ free(h->line);
free(h->data);
- os_free(h);
+ free(h);
} else
next_history();
} else