diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-05 16:59:41 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-05 16:59:41 +0000 |
commit | 9371146ad7a4c2f52c0dc50bccbd67b7781ed5c7 (patch) | |
tree | fafa9daca5b5ab5dc2280f57c9be8dc8194bd8e4 | |
parent | ddee5deb2dda383d597af69971cb8d85e3dc1598 (diff) | |
download | zsh-9371146ad7a4c2f52c0dc50bccbd67b7781ed5c7.tar.gz zsh-9371146ad7a4c2f52c0dc50bccbd67b7781ed5c7.tar.xz zsh-9371146ad7a4c2f52c0dc50bccbd67b7781ed5c7.zip |
28469: fix memory leak in anonymous function
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/exec.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 1d7cb66f0..6eb216030 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-12-05 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 28469: Src/exec.c: fix memory leak in anonymous function. + 2010-12-04 Wayne Davison <wayned@users.sourceforge.net> * Aaron Schrab: 28210: Completion/Unix/Command/_git: add completion @@ -13883,5 +13887,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5134 $ +* $Revision: 1.5135 $ ***************************************************** 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? */ |