-2011-03-04 Michael Snyder <msnyder@vmware.com>
-
- * cplus-dem.c (ada_demangle): Stop memory leak.
- Also fix a one line indent problem.
-
2011-02-28 Kai Tietz <kai.tietz@onevision.com>
* filename_cmp.c (filename_ncmp): New function.
int len0;
const char* p;
char *d;
- char *demangled = NULL;
+ char *demangled;
/* Discard leading _ada_, which is used for library level subprograms. */
if (strncmp (mangled, "_ada_", 5) == 0)
unknown:
len0 = strlen (mangled);
- free (demangled);
demangled = XNEWVEC (char, len0 + 3);
if (mangled[0] == '<')
- strcpy (demangled, mangled);
+ strcpy (demangled, mangled);
else
sprintf (demangled, "<%s>", mangled);