2008-06-21 Hui Zhu <teawater@gmail.com>

* target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
This commit is contained in:
Michael Snyder 2008-07-03 23:14:35 +00:00
parent dc177b7a51
commit db3b9a107a
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008-06-21 Hui Zhu <teawater@gmail.com>
* target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
2008-07-03 Pedro Alves <pedro@codesourcery.com>
* config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete.

View File

@ -1013,7 +1013,7 @@ maint_print_c_tdesc_cmd (char *args, int from_tty)
error (_("The current target description did not come from an XML file."));
filename = lbasename (target_description_filename);
function = xmalloc (strlen (filename) + 1);
function = alloca (strlen (filename) + 1);
for (inp = filename, outp = function; *inp != '\0'; inp++)
if (*inp == '.')
break;