summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/index/src/index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index c342da8274c..5892f741629 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -584,6 +584,7 @@ __index_fd_ctx_get (fd_t *fd, xlator_t *this, index_fd_ctx_t **ctx)
ret = __fd_ctx_set (fd, this, (uint64_t)(long)fctx);
if (ret) {
+ closedir (fctx->dir);
GF_FREE (fctx);
fctx = NULL;
ret = -EINVAL;