aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/hostio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/hostio.c')
-rw-r--r--gdb/gdbserver/hostio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c
index 712deb4..b3e26cd 100644
--- a/gdb/gdbserver/hostio.c
+++ b/gdb/gdbserver/hostio.c
@@ -116,7 +116,7 @@ require_data (char *p, int p_len, char **data, int *data_len)
{
int input_index, output_index, escaped;
- *data = malloc (p_len);
+ *data = xmalloc (p_len);
output_index = 0;
escaped = 0;
@@ -295,7 +295,7 @@ handle_open (char *own_buf)
}
/* Record the new file descriptor. */
- new_fd = malloc (sizeof (struct fd_list));
+ new_fd = xmalloc (sizeof (struct fd_list));
new_fd->fd = fd;
new_fd->next = open_fds;
open_fds = new_fd;
@@ -323,7 +323,7 @@ handle_pread (char *own_buf, int *new_packet_len)
return;
}
- data = malloc (len);
+ data = xmalloc (len);
#ifdef HAVE_PREAD
ret = pread (fd, data, len, offset);
#else