]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2009-09-23 Matthew Gingell <gingell@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 23 Sep 2009 08:20:24 +0000 (08:20 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 23 Sep 2009 08:20:24 +0000 (08:20 +0000)
* cplus-dem.c (ada_demangle): Ensure demangled is freed.

libiberty/ChangeLog
libiberty/cplus-dem.c

index cbadaedc68d34132e9bb6c010c05fee451919f2d..a9c14be7963079fc28affcb30a7a08fe1c2bc932 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-23  Matthew Gingell  <gingell@adacore.com>
+
+       * cplus-dem.c (ada_demangle): Ensure demangled is freed.
+
 2009-09-15  Tristan Gingold  <gingold@adacore.com>
 
        * config.h-vms (intptr_t): Define to compile hashtab.c
index 416746753660e6bb4c909f91f503258a4ad0b7d4..66285141ffa2ff6f6caaa4f5effa59f957bc9349 100644 (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;