diff options
author | Matthew Gingell <gingell@adacore.com> | 2009-09-23 08:08:40 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@gcc.gnu.org> | 2009-09-23 08:08:40 +0000 |
commit | 30b639a8453177e071582d070321627a10291427 (patch) | |
tree | c47cc305c00ae57d028f93dcaa770c3a8c5590e9 /libiberty/cplus-dem.c | |
parent | 457ff6a1d01865e2134912402a674d30ec898d76 (diff) | |
download | gcc-30b639a8453177e071582d070321627a10291427.tar.gz |
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
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r-- | libiberty/cplus-dem.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |