summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-08-14 16:54:04 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-08-14 16:54:04 +0000
commit7a38b670a7e5294b26192ed6505bcd8e8778fb49 (patch)
treedd288816da3c7ebe7f1c4357adce20cdb4605aa8 /Src/Zle
parentba14d4e1ee881a521b50fbd056bf9fb0fe1e2b60 (diff)
downloadzsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.tar.gz
zsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.tar.xz
zsh-7a38b670a7e5294b26192ed6505bcd8e8778fb49.zip
12621: Avoid bad free.
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_main.c2
1 files changed, 2 insertions, 0 deletions
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) {