Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible memory leak in hist.c
- X-seq: zsh-workers 24816
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Possible memory leak in hist.c
- Date: Mon, 14 Apr 2008 16:42:19 +0200
- In-reply-to: <200804141334.m3EDYRJj006753@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080414132735.GT1223@xxxxxxxxxxxxxxxxxxx> <200804141334.m3EDYRJj006753@xxxxxxxxxxxxxx>
On 2008-04-14 14:34:27 +0100, Peter Stephenson wrote:
> It does look suspicious. However, we're currently using tmpfile to
> indicate whether we should be reporting an error about the temporary
> file, so without more work it looks like we can't actually remove the
> early frees.
If fact there are two "free(tmpfile);": one of them is followed
by a "err = 0" and for the other one, ret remains >= 0, so that
if tmpfile is freed, then no more messages can be output.
> They should certainly be setting tmpfile to NULL, though.
This solution may be cleaner, though.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author