This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]