about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/Zle/zle_main.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 353c2992f..3912efe29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2008-11-12  Oliver Kiddle  <opk@zsh.org>
 
+	* 26030: Src/Zle/zle_main.c: fix memory leak in vared
+
 	* 26028: Src/builtin.c: close temporary file when aborting fc
 
 2008-11-12  Peter Stephenson  <pws@csr.com>
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 76bf44cbd..60972f5c5 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1562,6 +1562,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
 	/* 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;