about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_main.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 97b1f3be0..39f8ef7ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-08-14  Bart Schaefer  <schaefer@zsh.org>
 
+	* 12621: Src/Zle/zle_main.c: Use ztrdup() on a string that will
+	later be freed; this appears to have been a bug ever since 9839.
+
 	* Andrej: 12620: configure.in, Src/system.h: Fix cache variable
 	test for mmap, remove cygwin special-case.
 
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 73c402490..f02b2b75d 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -877,6 +877,8 @@ bin_vared(char *name, char **args, char *ops, int func)
     } else if (*s) {
 	zwarnnam(name, "invalid parameter name: %s", args[0], 0);
 	return 1;
+    } else {
+	s = ztrdup(s);
     }
 
     if (SHTTY == -1) {