about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-04-07 12:52:54 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-04-07 14:37:46 +0200
commit4044d73706a4779d145bc27512a434865b081f28 (patch)
treea624a05c67096d0d50ebcb8fdcf0ccd981f3f7c7 /Src
parent90afd3692280499dd191239f5fd2a69b183d24e6 (diff)
downloadzsh-4044d73706a4779d145bc27512a434865b081f28.tar.gz
zsh-4044d73706a4779d145bc27512a434865b081f28.tar.xz
zsh-4044d73706a4779d145bc27512a434865b081f28.zip
42600: error paths for _values leaked the exclusion list array
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/computil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 2e86e5740..5526e0ad0 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3022,6 +3022,7 @@ parse_cvdef(char *nam, char **args)
 
 	if (hassep && !sep && name + bs + 1 < p) {
 	    freecvdef(ret);
+	    if (xor) freearray(xor);
 	    zwarnnam(nam, "no multi-letter values with empty separator allowed");
 	    return NULL;
 	}
@@ -3035,6 +3036,7 @@ parse_cvdef(char *nam, char **args)
 
 	    if (!*p) {
 		freecvdef(ret);
+		if (xor) freearray(xor);
 		zwarnnam(nam, "invalid value definition: %s", *args);
 		return NULL;
 	    }
@@ -3046,6 +3048,7 @@ parse_cvdef(char *nam, char **args)
 	}
 	if (c && c != ':') {
 	    freecvdef(ret);
+	    if (xor) freearray(xor);
 	    zwarnnam(nam, "invalid value definition: %s", *args);
 	    return NULL;
 	}
@@ -3054,6 +3057,7 @@ parse_cvdef(char *nam, char **args)
 	if (c == ':') {
 	    if (hassep && !sep) {
 		freecvdef(ret);
+		if (xor) freearray(xor);
 		zwarnnam(nam, "no value with argument with empty separator allowed");
 		return NULL;
 	    }