use xmalloc in w32 opendir
authorBT Templeton <bpt@hcoop.net>
Thu, 28 Jun 2012 03:17:59 +0000 (23:17 -0400)
committerRobin Templeton <robin@terpri.org>
Sat, 18 Apr 2015 22:49:07 +0000 (18:49 -0400)
* src/w32.c (opendir): Use `xmalloc'.

src/w32.c

index 4643fc7..76b12ad 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -3347,7 +3347,7 @@ sys_opendir (const char *filename)
        return NULL;
     }
 
-  if (!(dirp = (DIR *) malloc (sizeof (DIR))))
+  if (!(dirp = xmalloc (sizeof (DIR))))
     return NULL;
 
   dirp->dd_fd = 0;