* utils.c (xmalloc,xcalloc,xstrdup): New fns.
[deliverable/binutils-gdb.git] / gdb / gdbserver / regcache.c
index b5ec2159fc213915db94d58d3e5e64191279eec9..66022dd6a63cedea00d91102f273b8f73f93b3de 100644 (file)
@@ -94,12 +94,12 @@ new_register_cache (void)
   if (register_bytes == 0)
     return NULL; /* The architecture hasn't been initialized yet.  */
 
-  regcache = malloc (sizeof (*regcache));
+  regcache = xmalloc (sizeof (*regcache));
 
   /* Make sure to zero-initialize the register cache when it is created,
      in case there are registers the target never fetches.  This way they'll
      read as zero instead of garbage.  */
-  regcache->registers = calloc (1, register_bytes);
+  regcache->registers = xcalloc (1, register_bytes);
   if (regcache->registers == NULL)
     fatal ("Could not allocate register cache.");
 
This page took 0.024063 seconds and 4 git commands to generate.