This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix gensupport.c memory leak (take 3)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, Steve Ellcey <sje at cup dot hp dot com>
- Date: Thu, 16 Mar 2006 16:58:55 -0700 (MST)
- Subject: Re: [PATCH] Fix gensupport.c memory leak (take 3)
Hi Andrew,
On Thu, 16 Mar 2006, Andrew Pinski wrote:
> You really don't need the if here as free handles NULL pointers just
> fine.
The "if" isn't required for correct operation on C99 targets,
but by the GCC coding standards. Its a historic portability issue.
I believe you were reminded of this when you suggested a similar
change to Uttam's original gensupport.c patch, and why his version
with ifs was approved over the version without.
http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01889.html
I hope this helps.
Roger
--