diff options
author | Michael Snyder <msnyder@vmware.com> | 2008-07-03 23:14:35 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2008-07-03 23:14:35 +0000 |
commit | db3b9a107acef30744295eb3c64237cde07a17f3 (patch) | |
tree | c37b80ac900c203fc965d354a764433d5e53e0d0 | |
parent | dc177b7a5114d1d8385ee3706188aa4e4f675676 (diff) | |
download | gdb-db3b9a107acef30744295eb3c64237cde07a17f3.zip gdb-db3b9a107acef30744295eb3c64237cde07a17f3.tar.gz gdb-db3b9a107acef30744295eb3c64237cde07a17f3.tar.bz2 |
2008-06-21 Hui Zhu <teawater@gmail.com>
* target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/target-descriptions.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0cdd935..00b928c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index e1535b3..95bf7c9 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; |