aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/filestuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common/filestuff.c')
-rw-r--r--gdb/common/filestuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 25ea8fa..c829a89 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -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);