From: Andre Noll Date: Sat, 22 Jun 2013 15:20:15 +0000 (+0200) Subject: i9e: Fix memory leak in clear_bottom_line(). X-Git-Tag: v0.4.13~24 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=1afc43be9a585ce634de84764f171e4478ec54be i9e: Fix memory leak in clear_bottom_line(). In clear_bottom_line() we call readline's rl_copy_text() which allocates a buffer for the given range of the current input line. But we never free this buffer, which results in a memory leak. This patch plugs the leak. --- diff --git a/interactive.c b/interactive.c index 6d30e12a..43cb99f2 100644 --- a/interactive.c +++ b/interactive.c @@ -272,6 +272,7 @@ static void clear_bottom_line(void) rl_redisplay(); wipe_bottom_line(); /* wipe out the prompt */ rl_insert_text(text); + free(text); rl_point = point; }