Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: another leak found by coverity, this one in _values
- X-seq: zsh-workers 42600
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: another leak found by coverity, this one in _values
- Date: Thu, 05 Apr 2018 19:09:46 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1522948194; bh=SbpNM8Y6l8x+1KUNQKi/CWgg3O8wYlZu7eipEZgT/o4=; h=From:To:Subject:Date:From:Subject; b=q3GNCg5E38lH0agWMS23lBUKEeV2izPrYtJogbI8Qde8sWnRc+4nKzLJL7GeiKXrJRUGC9ehnxnBMKiDXptDbNpbBjqxveX57y8ic9cHc1uw7Og078EsURrqBRKOARO8Cs5XWe33Fp14NO/wJR2zfCXXmHn+ludGO5SoZNXx9cZoA4r/eXpiB9+rwqmtchDob7IkVIwa/+a/AjYCJLJYujOdbkLwj8VHwenwZak7oiITvlbuORbMKRKGkIH0MrkouRi/KgQelIgLEVZKh7Lb70e989SAhhJdySFdN3VP4NmDw+yOXI3yGvWMPsT5fs75f7U4eKBAJDa/pigCaBrMcA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This is in the error handling paths for _values if an exclusion list was
successfully parsed but later errors occur when parsing the specs.
Oliver
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;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author