]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/corefile.c
Replace some xmalloc-family functions with XNEW-family ones
[thirdparty/binutils-gdb.git] / gdb / corefile.c
index 5246f7192ecaf0dc8ff0df360a5d4db4770d719d..eba36d6419aa76bc9d5be4c7a14cf328a4a6f1b3 100644 (file)
@@ -107,8 +107,7 @@ specify_exec_file_hook (void (*hook) (const char *))
        {
          /* If this is the first extra hook, initialize the hook
             array.  */
-         exec_file_extra_hooks = (hook_type *)
-           xmalloc (sizeof (hook_type));
+         exec_file_extra_hooks = XNEW (hook_type);
          exec_file_extra_hooks[0] = deprecated_exec_file_display_hook;
          deprecated_exec_file_display_hook = call_extra_exec_file_hooks;
          exec_file_hook_count = 1;