aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r--gdb/gnu-nat.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 54b543b..3ec3352 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -539,7 +539,7 @@ make_proc (struct inf *inf, mach_port_t port, int tid)
{
error_t err;
mach_port_t prev_port = MACH_PORT_NULL;
- struct proc *proc = malloc (sizeof (struct proc));
+ struct proc *proc = xmalloc (sizeof (struct proc));
proc->port = port;
proc->tid = tid;
@@ -636,10 +636,7 @@ _proc_free (struct proc *proc)
struct inf *
make_inf (void)
{
- struct inf *inf = malloc (sizeof (struct inf));
-
- if (!inf)
- return 0;
+ struct inf *inf = xmalloc (sizeof (struct inf));
inf->task = 0;
inf->threads = 0;