From bca929d3a66489b6b2aff2a9a81bc17853dff79e Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sun, 14 Dec 2008 20:51:04 +0000 Subject: * utils.c (xmalloc,xcalloc,xstrdup): New fns. * server.h (ATTR_MALLOC): New macro. (xmalloc,xcalloc,xstrdup): Declare. * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup. * inferiors.c: Ditto. * linux-low.c: Ditto. * mem-break.c: Ditto. * regcache.c: Ditto. * remote-utils.c: Ditto. * server.c: Ditto. * target.c: Ditto. * win32-low.c: Ditto. --- gdb/gdbserver/hostio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/gdbserver/hostio.c') 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 -- cgit v1.1