cplus-dem.c (ada_demangle): Ensure demangled is freed.

2009-09-23  Matthew Gingell <gingell@adacore.com>

	* cplus-dem.c (ada_demangle): Ensure demangled is freed.

From-SVN: r152060
This commit is contained in:
Matthew Gingell 2009-09-23 08:08:40 +00:00 committed by Tristan Gingold
parent 457ff6a1d0
commit 30b639a845
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-09-23 Matthew Gingell <gingell@adacore.com>
* cplus-dem.c (ada_demangle): Ensure demangled is freed.
2009-09-22 Ozkan Sezer <sezeroz@gmail.com>
* choose-temp.c: Include unistd.h for mingw targets.

View File

@ -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;