summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/torture.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/torture.c b/tests/torture.c
index a75b0a9..2a49f0d 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -110,6 +110,7 @@ int torture_rmdirs(const char *path) {
len = strlen(path) + strlen(dp->d_name) + 2;
fname = malloc(len);
if (fname == NULL) {
+ closedir(d);
return -1;
}
snprintf(fname, len, "%s/%s", path, dp->d_name);