summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2011-09-27 01:43:03 +0000
committerroot <root>2011-09-27 01:43:03 +0000
commit8473b588d2b7f8e5b57dc50a5bbecfee76f24abb (patch)
tree9b2e867dc82f4849b3c38d1879e8da4564c12a8c
parenta8bec0f61c72db8719d737a36bb508fd82cac33c (diff)
*** empty log message ***
-rw-r--r--eio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/eio.c b/eio.c
index aa567ac..18704a5 100644
--- a/eio.c
+++ b/eio.c
@@ -318,7 +318,7 @@ struct tmpbuf;
#if _POSIX_VERSION >= 200809L
#define HAVE_AT 1
- # define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD)
+ #define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD)
#ifndef O_SEARCH
#define O_SEARCH O_RDONLY
#endif
@@ -1786,6 +1786,9 @@ eio__scandir (eio_req *req, etp_worker *self)
return;
dirp = fdopendir (fd);
+
+ if (!dirp)
+ close (fd);
}
else
dirp = opendir (req->ptr1);