aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/target-descriptions.c2
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;