Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 14/17: getsubsargs: free ptr1 before returning
- X-seq: zsh-workers 34107
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 14/17: getsubsargs: free ptr1 before returning
- Date: Tue, 6 Jan 2015 06:25:46 +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=hK7AQxEB5bE0uZy/93rrP7zZJPLMUcqO/ePY8NK4Nnk=; b=Ttx4v/mLBuU0piRWKyp8lpkdDW7OCQ3l1T2MBXkgfJkSz2Nk8v0Ekzc5IdF6qfxill s6RN748OBYBMdajYtlmow0SfVB4tgNVfh+iE/9JS7R4ZHCuJgrTSNLeXiGaUGBeBMnJ9 NheszAPNI53+O7pgYcuxu2HnTriCCVICWP5zFdvmCBO1x5JAJ2pz5ymH685uXGWYIbVP y2QfsWEYztMM3qTXjLbScC3mgnuHrZ71TEUI3+zcucx/yjzxN152+zPiSNOdSSe8pmH5 Lsh20deJTEmLxinP5kQqFRIQCOMqQAbdkbi4QVpfN5kCQ3DFAgIAnIhorUhvAQRAEnPK aMNQ==
- 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 439073).
---
Src/hist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Src/hist.c b/Src/hist.c
index d8192c1..e65d78b 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -367,6 +367,7 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
zsfree(hsubl);
hsubl = ptr1;
} else if (!hsubl) { /* fail silently on this */
+ zsfree(ptr1);
zsfree(ptr2);
return 0;
}
--
2.2.0.GIT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author