summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_main.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 234c46937..28305e91d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-19 Peter Stephenson <pws@csr.com>
+
+ * 18548: Src/Zle/zle_main.c: memory leak when vared'ing arrays
+ spotted by valgrind (18543).
+
2003-05-15 Oliver Kiddle <opk@zsh.org>
* 18530: Src/builtin.c, Src/options.c, Doc/Zsh/builtins.yo:
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 1f2f07a09..8daf60085 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1177,9 +1177,10 @@ bin_vared(char *name, char **args, Options ops, int func)
/*
* Use spacesplit with fourth argument 1: identify quoted separators,
- * unquote but don't split.
+ * and unquote. This duplicates the string, so we still need to free.
*/
a = spacesplit(t, 1, 0, 1);
+ zsfree(t);
if (PM_TYPE(pm->flags) == PM_ARRAY)
setaparam(args[0], a);
else