Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Possible memory leak in hist.c



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