From 1afc43be9a585ce634de84764f171e4478ec54be Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 22 Jun 2013 17:20:15 +0200 Subject: [PATCH 1/1] 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. --- interactive.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.2