From 29a584fba68a6c7706504fe8939e3de32abbf61d Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 23 Sep 2009 17:59:27 +0000 Subject: [PATCH] merge from gcc --- libiberty/ChangeLog | 4 ++++ libiberty/cplus-dem.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index afa8c6b3b..dd1c1a301 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 416746753..66285141f 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; -- 2.11.4.GIT