From 469f25a9efa89c89231cddaf983cb7d449df0487 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 20 Nov 2014 22:42:37 +0530 Subject: features/index: closedir() if fd_ctx_set() fails in __index_fd_ctx_get. Change-Id: I9ab599cf4a90c2e285d63ec0f56af210709285b6 BUG: 1166284 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/9168 Reviewed-by: Venky Shankar Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- xlators/features/index/src/index.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/features/index/src') 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; -- cgit