Re: [PATCH] trap: fix memory leak in exitshell()

2016-11-22 Thread Jilles Tjoelker
On Mon, Nov 21, 2016 at 10:40:52PM +0100, Andreas Bofjall wrote: > After dash had executed the exit trap handler, the trap was reset but > the pointer was never freed. This leak can be demonstrated by running > dash through valgrind and executing the following shell script: > foo() { >

Re: [PATCH] trap: fix memory leak in exitshell()

2016-11-22 Thread Andreas Bofjäll
On Tue, 22 Nov 2016, Jilles Tjoelker wrote: On Mon, Nov 21, 2016 at 10:40:52PM +0100, Andreas Bofjall wrote: diff --git a/src/trap.c b/src/trap.c index edb9938..5418b07 100644 --- a/src/trap.c +++ b/src/trap.c @@ -389,6 +389,7 @@ exitshell(void) trap[0] = NULL; e