From: Andre Noll Date: Wed, 14 Jun 2023 21:15:18 +0000 (+0200) Subject: i9e: Clear history on close. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=bcb7a09eacc8389f496e3365cfad0ad087c1f3cb;p=paraslash.git i9e: Clear history on close. This frees each history entry and the history itself, reducing the amount of memory leaked by readline applications on exit. Normally, this should not be used since it leaks the memory associated with the user defined history data pointer of each entry. However, that's OK here because the i9e subsystem ignores this feature of the history library. --- diff --git a/interactive.c b/interactive.c index 1376cf1d..4d48742f 100644 --- a/interactive.c +++ b/interactive.c @@ -229,6 +229,7 @@ void i9e_close(void) rl_callback_handler_remove(); if (hf) write_history(hf); + clear_history(); wipe_bottom_line(); fcntl(i9ep->ici->fds[0], F_SETFL, i9ep->fd_flags[0]); fcntl(i9ep->ici->fds[1], F_SETFL, i9ep->fd_flags[1]);