From 9371146ad7a4c2f52c0dc50bccbd67b7781ed5c7 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 5 Dec 2010 16:59:41 +0000 Subject: 28469: fix memory leak in anonymous function --- Src/exec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index e74fac578..85d996bd4 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4159,6 +4159,10 @@ execfuncdef(Estate state, UNUSED(int do_exec)) execshfunc(shf, args); ret = lastval; + + freeeprog(shf->funcdef); + zsfree(shf->filename); + zfree(shf, sizeof(*shf)); break; } else { /* is this shell function a signal trap? */ -- cgit 1.4.1