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

Jeff Law law@redhat.com
Fri Mar 4 18:41:00 GMT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/04/11 11:36, Tom Tromey wrote:
> Michael> How come 'xfree' in gdb/utils.c still checks for null?
> 
> I don't know, but I assume just because nobody has bothered to remove
> the check.  I think we also still have code doing `if (x) xfree (x);',
> which is kind of doubly wrong :)
We probably have similar crud in GCC as well; I vaguely recall a
discussion and patches which removed some of this crud, but I doubt it's
all been cleaned up.

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNcTJXAAoJEBRtltQi2kC7EboIAJyiVz4y0JXJbydigH2IKHVK
yb13AVw5i6cE4cG4S0WVhOJxyxYVGMX83KzeEqJPLjuEQ45Pb/ePO+eCQkXFPUJM
cDdk1WbcSa/TLd1DpcuJDlcEsD3XgkcZb7snhTwqJts8OOKNmKnCMdb0S5F6alBJ
PeOmhXkk+O4Fw0IwrBH7dhZd6MHwFCzqZFwotEm01lsHKoOh4RYVh4V8ug1VVRCY
bB7XuctXJgdtEyXqg/wjHObsGBViSdO8putOgFATKyedWDxGKKAVWyXK/pNIMX7v
L/PSdm4/H0U0Ku0uDtxuGef4mUE1q5aq+zRWpHA2wNvAvZ1opiDZcaDGP1yeuEw=
=LTVa
-----END PGP SIGNATURE-----



More information about the Gcc-patches mailing list