aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 1fb07d5..36b6c59 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -210,7 +210,7 @@ lm_info_read (CORE_ADDR lm_addr)
{
struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
- lm_info = xzalloc (sizeof (*lm_info));
+ lm_info = XCNEW (struct lm_info);
lm_info->lm_addr = lm_addr;
lm_info->l_addr_inferior = extract_typed_address (&lm[lmo->l_addr_offset],
@@ -1133,10 +1133,10 @@ svr4_copy_library_list (struct so_list *src)
{
struct so_list *newobj;
- newobj = xmalloc (sizeof (struct so_list));
+ newobj = XNEW (struct so_list);
memcpy (newobj, src, sizeof (struct so_list));
- newobj->lm_info = xmalloc (sizeof (struct lm_info));
+ newobj->lm_info = XNEW (struct lm_info);
memcpy (newobj->lm_info, src->lm_info, sizeof (struct lm_info));
newobj->next = NULL;
@@ -1323,7 +1323,7 @@ svr4_default_sos (void)
newobj = XCNEW (struct so_list);
- newobj->lm_info = xzalloc (sizeof (struct lm_info));
+ newobj->lm_info = XCNEW (struct lm_info);
/* Nothing will ever check the other fields if we set l_addr_p. */
newobj->lm_info->l_addr = info->debug_loader_offset;