From 417b9017b83272fbda58139c3a8f806fe4928e9c Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Wed, 6 Mar 2019 09:08:06 +0200 Subject: [PATCH] Fix history leak on exit Signed-off-by: Yan Burman --- icli.c | 2 ++ valgrind.sup | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/icli.c b/icli.c index 134152d..403447f 100644 --- a/icli.c +++ b/icli.c @@ -1012,6 +1012,8 @@ void icli_cleanup(void) free(mylist); free(hist_state); + clear_history(); + free(rl_readline_name); rl_readline_name = ""; diff --git a/valgrind.sup b/valgrind.sup index d97cf7c..92af8ff 100644 --- a/valgrind.sup +++ b/valgrind.sup @@ -6,14 +6,6 @@ ... } -{ - - Memcheck:Leak - ... - fun:add_history - ... -} - { Memcheck:Leak