Skip to content

Commit

Permalink
Fix history leak on exit
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Burman <[email protected]>
  • Loading branch information
yanburman committed Mar 6, 2019
1 parent 00f3013 commit 417b901
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions icli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,8 @@ void icli_cleanup(void)
free(mylist);
free(hist_state);

clear_history();

free(rl_readline_name);
rl_readline_name = "";

Expand Down
8 changes: 0 additions & 8 deletions valgrind.sup
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
...
}

{
<editline_history_leak>
Memcheck:Leak
...
fun:add_history
...
}

{
<editline_prompt_leak>
Memcheck:Leak
Expand Down

0 comments on commit 417b901

Please sign in to comment.