[PATCH] Fix gensupport.c memory leak (take 3)
Andrew Pinski
pinskia@physics.uc.edu
Thu Mar 16 23:56:00 GMT 2006
On Mar 16, 2006, at 5:58 PM, Roger Sayle wrote:
> + /* predicable_true and predicable_false are only ever set in this
> + function, which ensures that we need to free only
> predicable_false
> + to avoid memory leaks. */
> + if (predicable_false)
> + free ((void*) predicable_false);
You really don't need the if here as free handles NULL pointers just
fine.
-- Pinski
More information about the Gcc-patches
mailing list