Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 12/17: typeset: fix leak of oldval
- X-seq: zsh-workers 34112
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 12/17: typeset: fix leak of oldval
- Date: Tue, 6 Jan 2015 06:25:44 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=JeRO321K/h+FFskdTGPfDMAB/Qa5uI0C1fkjfVxMdBE=; b=cqygHrNBOXv/fLdY+UitHarwDXE1eOb2FomzXJJYdM3FfvA7gVrQrLheQVemEss/QN zGlyg2NjuXaA1YcqDX7CoMbxHtNrHWGdDSXLGoME31qAvHSgiSav+n2Y1TISpm4egvII 6fz8Ll7aJKcKJ3B23gbU/IPZTL5hXnOvGTzSgwQVAoL1pk/Dmyi6FroQxq44Pfd8otq6 l+vX3KuK+/Gy2XrkxRpGeIl+BXdHFy/TbU9RuAV8jM2sCxGTO4F7lq+eiopZNntnc1Wy kf1FK2eMO8MpAfgfY4HkChqk6cwPC+DVmmskF068WiU8rRa2bayl+QT8WK25+9FVmqra Fv9w==
- In-reply-to: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
Found by Coverity (Issue 1255803).
---
Src/builtin.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Src/builtin.c b/Src/builtin.c
index ae7f53b..38d34ae 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2510,6 +2510,8 @@ bin_typeset(char *name, char **argv, Options ops, int func)
asg->name),
func, (on | PM_ARRAY) & ~PM_EXPORTED,
off, roff, asg->value, NULL, ops, 0))) {
+ if (oldval)
+ zsfree(oldval);
unqueue_signals();
return 1;
}
--
2.2.0.GIT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author