]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
i9e: Fix memory leak in clear_bottom_line().
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Jun 2013 15:20:15 +0000 (17:20 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Jun 2013 15:20:15 +0000 (17:20 +0200)
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

index 6d30e12aae63503061114e18b3e1fc7b4a118ec8..43cb99f2781979e74b66eef640fadb7878f30aeb 100644 (file)
@@ -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;
 }