This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] gdbserver/linux-arm-nat.c, arm_arch_setup, use xmalloc
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Pedro Alves <pedro at codesourcery dot com>
- Date: Wed, 02 Mar 2011 11:47:23 -0800
- Subject: [RFA] gdbserver/linux-arm-nat.c, arm_arch_setup, use xmalloc
What about this one?
2011-03-02 Michael Snyder <msnyder@vmware.com>
* gdbserver/linux-arm-low.c (arm_arch_setup): Replace malloc
with xmalloc.
Index: gdbserver/linux-arm-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-arm-low.c,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 linux-arm-low.c
--- gdbserver/linux-arm-low.c 1 Jan 2011 15:33:24 -0000 1.26
+++ gdbserver/linux-arm-low.c 2 Mar 2011 19:44:57 -0000
@@ -336,7 +336,7 @@ arm_arch_setup (void)
registers. Support was added in 2.6.30. */
pid = lwpid_of (get_thread_lwp (current_inferior));
errno = 0;
- buf = malloc (32 * 8 + 4);
+ buf = xmalloc (32 * 8 + 4);
if (ptrace (PTRACE_GETVFPREGS, pid, 0, buf) < 0
&& errno == EIO)
{