aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/target.c')
-rw-r--r--gdb/gdbserver/target.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c
index 86c62a3..fbc558c 100644
--- a/gdb/gdbserver/target.c
+++ b/gdb/gdbserver/target.c
@@ -77,7 +77,7 @@ write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
if (buffer != NULL)
free (buffer);
- buffer = malloc (len);
+ buffer = xmalloc (len);
memcpy (buffer, myaddr, len);
check_mem_write (memaddr, buffer, len);
res = (*the_target->write_memory) (memaddr, buffer, len);
@@ -106,6 +106,6 @@ mywait (char *statusp, int connected_wait)
void
set_target_ops (struct target_ops *target)
{
- the_target = (struct target_ops *) malloc (sizeof (*the_target));
+ the_target = (struct target_ops *) xmalloc (sizeof (*the_target));
memcpy (the_target, target, sizeof (*the_target));
}