Replace some xmalloc-family functions with XNEW-family ones
[deliverable/binutils-gdb.git] / gdb / common / filestuff.c
index 25ea8fa61b4fe81b04e1d03b8fb8387d5cb4fa4b..c829a8928321eda3ed28e809a1a619603104d3ff 100644 (file)
@@ -420,7 +420,7 @@ do_close_cleanup (void *arg)
 struct cleanup *
 make_cleanup_close (int fd)
 {
-  int *saved_fd = xmalloc (sizeof (fd));
+  int *saved_fd = XNEW (int);
 
   *saved_fd = fd;
   return make_cleanup_dtor (do_close_cleanup, saved_fd, xfree);
This page took 0.024001 seconds and 4 git commands to generate.