aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 936a5a7..bb9e41c 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -852,7 +852,7 @@ write_object_renaming (struct block *orig_left_context,
if (end == NULL)
end = suffix + strlen (suffix);
field_name.length = end - suffix;
- field_name.ptr = (char *) malloc (end - suffix + 1);
+ field_name.ptr = xmalloc (end - suffix + 1);
strncpy (field_name.ptr, suffix, end - suffix);
field_name.ptr[end - suffix] = '\000';
suffix = end;