Replace some xmalloc-family functions with XNEW-family ones
[deliverable/binutils-gdb.git] / gdb / gdbserver / ax.c
index f94a27d96bb7aa2935c1e794bd7cfc72bc1ba880..d834fbb3c21e526fd1549a6c3b7f32f9bd982010 100644 (file)
@@ -102,7 +102,7 @@ gdb_parse_agent_expr (char **actparm)
   ++act;  /* skip the X */
   act = unpack_varlen_hex (act, &xlen);
   ++act;  /* skip a comma */
-  aexpr = xmalloc (sizeof (struct agent_expr));
+  aexpr = XNEW (struct agent_expr);
   aexpr->length = xlen;
   aexpr->bytes = xmalloc (xlen);
   hex2bin (act, aexpr->bytes, xlen);
@@ -430,7 +430,7 @@ compile_bytecodes (struct agent_expr *aexpr)
 
       /* Record the compiled-code address of the bytecode, for use by
         jump instructions.  */
-      aentry = xmalloc (sizeof (struct bytecode_address));
+      aentry = XNEW (struct bytecode_address);
       aentry->pc = pc;
       aentry->address = current_insn_ptr;
       aentry->goto_pc = -1;
This page took 0.025663 seconds and 4 git commands to generate.