From: DJ Delorie Date: Wed, 23 Sep 2009 17:59:27 +0000 (+0000) Subject: merge from gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=572771db36119a9aea94d265cfe9607b6c1721b9;p=binutils-gdb.git merge from gcc --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index afa8c6b3bd9..dd1c1a301fc 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2009-09-23 Matthew Gingell + + * cplus-dem.c (ada_demangle): Ensure demangled is freed. + 2009-09-22 Ozkan Sezer * choose-temp.c: Include unistd.h for mingw targets. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 41674675366..66285141ffa 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -984,7 +984,10 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED) goto Suppress; if (! changed) - return NULL; + { + free (demangled); + return NULL; + } else return demangled;