From 4ba6c5d3ba3d2c7922aff6b5c2e73b8325f1cf17 Mon Sep 17 00:00:00 2001 From: Jon Tollefson Date: Tue, 13 Nov 2012 19:26:53 +0100 Subject: ash: fix a memory leak The script which triggers the leak: while true do while true do break; done Signed-off-by: Denys Vlasenko --- shell/ash.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 010924db4..dda18e8b5 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: -- cgit v1.2.3