[PATCH] Fix gensupport.c memory leak (take 3)
Andrew Pinski
pinskia@physics.uc.edu
Fri Mar 17 00:44:00 GMT 2006
On Mar 16, 2006, at 7:29 PM, Roger Sayle wrote:
> Otherwise, Andrew can
> file a set of bugzilla PRs for all the places in GCC we call realloc
> on a NULL pointer :-)
Actually nowhere calls realloc with a NULL pointer because of xrealloc
:).
Which does:
if (!oldmem)
newmem = malloc (size);
else
newmem = realloc (oldmem, size);
if (!newmem)
xmalloc_failed (size);
-- Pinski
More information about the Gcc-patches
mailing list