Download raw body.
leak in mg, interpreter.c:599
Hello, Han Boetes <hboetes@gmail.com> wrote: > While playing around with valgrind and mg I noticed some leaks. > First, I created a test init-file with the contents: > > (define myvar "hello") > (define myvar "world") > > After which something is leaking in interpreter.c at line 599, see > valgrind output below. > > Upon redefinition of a variable, the old varentry and its v_name string > are not freed. Additionally, SLIST_INSERT_HEAD is called before strndup > succeeds, meaning a failed strndup leaves a partially initialised entry > in the live list. > The following patch fixes both issues. With it applied, the > interpreter.c leak in the valgrind output below disappears. Thanks for the diff! I was a bit confused why v_vals was not freed as well, but it seems it's never used (just set to NULL), so I've left it as-is for now. Just fyi: the diff was mangled by the mua, and the indentation seemed a bit off, so I had to hand-apply it. Thanks! Omar Polo
leak in mg, interpreter.c:599