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() { >

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

2016-11-21 Thread Andreas Bofjall
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() { true } trap foo EXIT Fix by properly freeing the