projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4b9451
)
ash: fix a memory leak
author
Jon Tollefson
<kniht@linux.vnet.ibm.com>
Tue, 13 Nov 2012 18:26:53 +0000
(19:26 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 13 Nov 2012 18:26:53 +0000
(19:26 +0100)
The script which triggers the leak:
while true
do
while true
do
break;
done</dev/null
done
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 010924db4a0db30cd80f9352fc28a80e0f233b9f..dda18e8b55283207a3523a2140c42ab5827072c5 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-8676,6
+8676,8
@@
expredir(union node *n)
#if ENABLE_ASH_BASH_COMPAT
store_expfname:
#endif
+ if (redir->nfile.expfname)
+ stunalloc(redir->nfile.expfname);
redir->nfile.expfname = fn.list->text;
break;
case NFROMFD: