summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/index/src/index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index ce037aa244b..ec395e8a4bb 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -490,8 +490,10 @@ sync_base_indices_from_xattrop (xlator_t *this)
continue;
}
ret = unlink (entry->d_name);
- if (ret)
+ if (ret) {
+ closedir (dir);
goto out;
+ }
}
closedir (dir);
}