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

Re: PATCH: loadautofn memory leak



On Sun, Sep 21, 2008 at 12:45:30PM +0000, Clint Adams wrote:
> getfpfunc allocates memory for fname, which was not freed one these
> codepaths.

That wasn't even English, and this was causing segfaults.  Possibly the
entirety of 25701 was a huge mistake.

Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.154
diff -u -r1.154 exec.c
--- Src/exec.c	21 Sep 2008 13:41:03 -0000	1.154
+++ Src/exec.c	22 Sep 2008 17:29:16 -0000
@@ -4134,7 +4134,6 @@
 	zwarn("%s: function definition file not found", shf->node.nam);
 	locallevel++;
 	popheap();
-	zsfree(fname);
 	return NULL;
     }
     if (!prog) {



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