projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb51016
)
i9e: Fix memory leak in clear_bottom_line().
author
Andre Noll
<maan@systemlinux.org>
Sat, 22 Jun 2013 15:20:15 +0000
(17:20 +0200)
committer
Andre 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
patch
|
blob
|
history
diff --git
a/interactive.c
b/interactive.c
index
6d30e12
..
43cb99f
100644
(file)
--- 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;
}