diff options
author | Jon Tollefson | 2012-11-13 19:26:53 +0100 |
---|---|---|
committer | Denys Vlasenko | 2012-11-13 19:26:53 +0100 |
commit | 4ba6c5d3ba3d2c7922aff6b5c2e73b8325f1cf17 (patch) | |
tree | 2d4fca6585c985d96463c2eb2f4ac548d046f006 | |
parent | e4b9451413013388757cf48fbb16d8137ddd1ccb (diff) | |
download | busybox-4ba6c5d3ba3d2c7922aff6b5c2e73b8325f1cf17.zip busybox-4ba6c5d3ba3d2c7922aff6b5c2e73b8325f1cf17.tar.gz |
ash: fix a memory leak
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>
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 010924d..dda18e8 100644 --- 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: |