summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bftw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bftw.c b/bftw.c
index ab16b67..d62a71f 100644
--- a/bftw.c
+++ b/bftw.c
@@ -1040,6 +1040,7 @@ int bftw(const char *path, bftw_fn *fn, int nopenfd, enum bftw_flags flags, void
}
if (bftw_path_concat(&state, de->d_name) != 0) {
+ closedir(dir);
goto fail;
}