From: Michael Snyder Date: Thu, 3 Jul 2008 23:14:35 +0000 (+0000) Subject: 2008-06-21 Hui Zhu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db3b9a107acef30744295eb3c64237cde07a17f3;p=binutils-gdb.git 2008-06-21 Hui Zhu * target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0cdd9355707..00b928c588c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-06-21 Hui Zhu + + * target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak. + 2008-07-03 Pedro Alves * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete. diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index e1535b39875..95bf7c9724f 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -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;