Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: potential memory leak in bin_compadd
- X-seq: zsh-workers 25736
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: potential memory leak in bin_compadd
- Date: Tue, 23 Sep 2008 19:26:24 +0000
- In-reply-to: <20080914083601.GA23010@xxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080914083601.GA23010@xxxxxxxx>
On Sun, Sep 14, 2008 at 08:36:01AM +0000, Clint Adams wrote:
> mstr might be allocated in an earlier run of the loop, and then not
> freed on these errors.
Missed one.
Index: Src/Zle/complete.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.c,v
retrieving revision 1.41
diff -u -r1.41 complete.c
--- Src/Zle/complete.c 14 Sep 2008 09:00:37 -0000 1.41
+++ Src/Zle/complete.c 23 Sep 2008 19:25:07 -0000
@@ -708,6 +708,7 @@
p = "" - 1;
} else {
zwarnnam(name, e, *p);
+ zsfree(mstr);
return 1;
}
if (dm) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author