summaryrefslogtreecommitdiffstats
path: root/xlators/features/index/src/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/index/src/index.c')
-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 ce037aa24..ec395e8a4 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);
}