From: Jon Tollefson Date: Tue, 13 Nov 2012 18:26:53 +0000 (+0100) Subject: ash: fix a memory leak X-Git-Tag: 1_21_0~44 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4ba6c5d3ba3d2c7922aff6b5c2e73b8325f1cf17;p=oweals%2Fbusybox.git ash: fix a memory leak The script which triggers the leak: while true do while true do break; done Signed-off-by: Denys Vlasenko --- 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: