From 8473b588d2b7f8e5b57dc50a5bbecfee76f24abb Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Sep 2011 01:43:03 +0000 Subject: *** empty log message *** --- eio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3