zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: vared memory leak
@ 2008-11-12 12:54 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2008-11-12 12:54 UTC (permalink / raw)
  To: Zsh workers

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-12 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-12 12:54 PATCH: vared memory leak Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).