summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 0581bb7d8..4c707accf 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3519,6 +3519,13 @@ posix_readdir (call_frame_t *frame, xlator_t *this,
goto out;
}
pfd = (struct posix_fd *)(long)tmp_pfd;
+ if (!pfd->path) {
+ op_errno = EBADFD;
+ gf_log (this->name, GF_LOG_DEBUG,
+ "pfd does not have path set (possibly file "
+ "fd, fd=%p)", fd);
+ goto out;
+ }
real_path = pfd->path;
real_path_len = strlen (real_path);