libiberty/cplus-dem.c, ada-demangle: plug memory leak.

Michael Snyder msnyder@vmware.com
Fri Mar 4 18:27:00 GMT 2011


Tom Tromey wrote:
>>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
> 
> Michael> Are you sure?  There is a path to "goto unknown" from before the
> Michael> call to the alloc function.  It might actually be null.  Some
> Michael> versions of 'free' don't like that.
> 
> This isn't an issue with free any more.  Jim Meyering did some research
> into it a while ago and fixed a number of popular free software projects
> to remove the useless test.  Here's a page with some interesting data:
> 
> http://www.winehq.org/pipermail/wine-patches/2006-October/031544.html
> 
> Tom

Thanks for the info.
Checking in without the null pointer test.

How come 'xfree' in gdb/utils.c still checks for null?




More information about the Gcc-patches mailing list