Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH 13/17: anon funcs: don't leak shf when ctrl-c in () {:} =(sleep 1)



Found by Coverity (Issue 439076).
---
 Src/exec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Src/exec.c b/Src/exec.c
index 6b93008..207e8c1 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4461,6 +4461,8 @@ execfuncdef(Estate state, Eprog redir_prog)
 	    if (htok && args) {
 		execsubst(args);
 		if (errflag) {
+		    zsfree(shf->filename);
+		    zfree(shf, sizeof(*shf));
 		    state->pc = end;
 		    return 1;
 		}
-- 
2.2.0.GIT



Messages sorted by: Reverse Date, Date, Thread, Author