summaryrefslogtreecommitdiff
path: root/tools/perf/tests/tests-scripts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/tests-scripts.c')
-rw-r--r--tools/perf/tests/tests-scripts.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/tests-scripts.c b/tools/perf/tests/tests-scripts.c
index 1d5759d08141..3a2a8438f9af 100644
--- a/tools/perf/tests/tests-scripts.c
+++ b/tools/perf/tests/tests-scripts.c
@@ -260,6 +260,7 @@ static void append_scripts_in_dir(int dir_fd,
continue; /* Skip scripts that have a separate driver. */
fd = openat(dir_fd, ent->d_name, O_PATH);
append_scripts_in_dir(fd, result, result_sz);
+ close(fd);
}
for (i = 0; i < n_dirs; i++) /* Clean up */
zfree(&entlist[i]);