diff options
author | gingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-23 08:08:40 +0000 |
---|---|---|
committer | gingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-23 08:08:40 +0000 |
commit | 56a1c361c58e42af9b73a30829e393fd0b276716 (patch) | |
tree | c47cc305c00ae57d028f93dcaa770c3a8c5590e9 /libiberty/cplus-dem.c | |
parent | 4dd3321dedbb3624293437e22e45235ed1e84531 (diff) | |
download | gcc-56a1c361c58e42af9b73a30829e393fd0b276716.tar.gz |
2009-09-23 Matthew Gingell <gingell@adacore.com>
* cplus-dem.c (ada_demangle): Ensure demangled is freed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152060 138bc75d-0d04-0410-961f-82ee72b054a4
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; |