From 7c4b13e0190a645f4083741c7803e51984cf71cb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 17 Jan 2013 13:02:27 +0100 Subject: ash: revert wrong "fix" for an apparent memory leak. Closes 5822 Signed-off-by: Denys Vlasenko --- shell/ash.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index eb13474..31fbc55 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -8677,8 +8677,17 @@ expredir(union node *n) #if ENABLE_ASH_BASH_COMPAT store_expfname: #endif +#if 0 +// By the design of stack allocator, the loop of this kind: +// while true; do while true; do break; done nfile.expfname) stunalloc(redir->nfile.expfname); +// It results in corrupted state of stacked allocations. +#endif redir->nfile.expfname = fn.list->text; break; case NFROMFD: -- cgit v1.1