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

PATCH: vared memory leak



vared without a terminal leaks memory for the string containing the
variable name. This is CID 111 and 113.

Oliver

Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.119
diff -u -r1.119 zle_main.c
--- Src/Zle/zle_main.c	11 Nov 2008 18:25:45 -0000	1.119
+++ Src/Zle/zle_main.c	12 Nov 2008 12:50:54 -0000
@@ -1562,6 +1562,7 @@
 	/* need to open /dev/tty specially */
 	if ((SHTTY = open("/dev/tty", O_RDWR|O_NOCTTY)) == -1) {
 	    zwarnnam(name, "can't access terminal");
+	    zsfree(s);
 	    return 1;
 	}
 	oshout = shout;



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