aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-10-25 02:16:39 +0000
committerPedro Alves <palves@redhat.com>2008-10-25 02:16:39 +0000
commitbbe2ba601d37a94408f5783549352571b1b87675 (patch)
tree1a64dc07aca4819b4d71f98163f42ae3000d342f /gdb/ada-exp.y
parent0775829945ae55c63a5e3389b2052a7ffebc6d0f (diff)
downloadgdb-bbe2ba601d37a94408f5783549352571b1b87675.zip
gdb-bbe2ba601d37a94408f5783549352571b1b87675.tar.gz
gdb-bbe2ba601d37a94408f5783549352571b1b87675.tar.bz2
* ada-exp.y (write_object_renaming): Use malloc instead of
xmalloc. * p-exp.y (pop_current_type): Use free instead of xfree.
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 e440663..4b8bb93 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -987,7 +987,7 @@ write_object_renaming (struct block *orig_left_context,
if (end == NULL)
end = renaming_expr + strlen (renaming_expr);
field_name.length = end - renaming_expr;
- field_name.ptr = xmalloc (end - renaming_expr + 1);
+ field_name.ptr = malloc (end - renaming_expr + 1);
strncpy (field_name.ptr, renaming_expr, end - renaming_expr);
field_name.ptr[end - renaming_expr] = '\000';
renaming_expr = end;