diff options
-rw-r--r-- | source3/lib/replace/repdir_getdents.c | 20 | ||||
-rw-r--r-- | source3/lib/replace/repdir_getdirentries.c | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/source3/lib/replace/repdir_getdents.c b/source3/lib/replace/repdir_getdents.c index 3bf76ee858..6b115c4c4f 100644 --- a/source3/lib/replace/repdir_getdents.c +++ b/source3/lib/replace/repdir_getdents.c @@ -80,16 +80,16 @@ DIR *opendir(const char *dname) return NULL; } if (fstat(d->fd, &sb) < 0) { - close(d->fd); - free(d); - return NULL; - } - if (!S_ISDIR(sb.st_mode)) { - close(d->fd); - free(d); - errno = ENOTDIR; - return NULL; - } + close(d->fd); + free(d); + return NULL; + } + if (!S_ISDIR(sb.st_mode)) { + close(d->fd); + free(d); + errno = ENOTDIR; + return NULL; + } d->ofs = 0; d->seekpos = 0; d->nbytes = 0; diff --git a/source3/lib/replace/repdir_getdirentries.c b/source3/lib/replace/repdir_getdirentries.c index ee1d218456..a6026dfb5d 100644 --- a/source3/lib/replace/repdir_getdirentries.c +++ b/source3/lib/replace/repdir_getdirentries.c @@ -82,16 +82,16 @@ DIR *opendir(const char *dname) return NULL; } if (fstat(d->fd, &sb) < 0) { - close(d->fd); - free(d); - return NULL; - } - if (!S_ISDIR(sb.st_mode)) { - close(d->fd); - free(d); - errno = ENOTDIR; - return NULL; - } + close(d->fd); + free(d); + return NULL; + } + if (!S_ISDIR(sb.st_mode)) { + close(d->fd); + free(d); + errno = ENOTDIR; + return NULL; + } d->ofs = 0; d->seekpos = 0; d->nbytes = 0; |