aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cplus-dem.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r--libiberty/cplus-dem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index f954050..7f63397 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -911,7 +911,7 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
int len0;
const char* p;
char *d;
- char *demangled;
+ char *demangled = NULL;
/* Discard leading _ada_, which is used for library level subprograms. */
if (strncmp (mangled, "_ada_", 5) == 0)
@@ -1156,6 +1156,7 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
return demangled;
unknown:
+ XDELETEVEC (demangled);
len0 = strlen (mangled);
demangled = XNEWVEC (char, len0 + 3);