From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: another leak found by coverity, this one in _values
Date: Thu, 05 Apr 2018 19:09:46 +0200 [thread overview]
Message-ID: <27515.1522948186@thecus> (raw)
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;
}
reply other threads:[~2018-04-06 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27515.1522948186@thecus \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).