summaryrefslogtreecommitdiffstats
path: root/xlators/features/index
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2014-11-20 22:42:37 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2014-12-04 04:31:22 -0800
commit469f25a9efa89c89231cddaf983cb7d449df0487 (patch)
tree5bf829c33fd51cdd04802ecd2343067c94692361 /xlators/features/index
parent1eb11c7ca1eb153c579a127b0fe6c2d4b1bbc7c8 (diff)
features/index: closedir() if fd_ctx_set() fails in __index_fd_ctx_get.
Change-Id: I9ab599cf4a90c2e285d63ec0f56af210709285b6 BUG: 1166284 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/9168 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/index')
-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;