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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/tests/tests-scripts.c b/tools/perf/tests/tests-scripts.c
index 1d5759d08141..f18c4cd337c8 100644
--- a/tools/perf/tests/tests-scripts.c
+++ b/tools/perf/tests/tests-scripts.c
@@ -85,7 +85,7 @@ static char *shell_test__description(int dir_fd, const char *name)
if (io.fd < 0)
return NULL;
- /* Skip first line - should be #!/bin/sh Shebang */
+ /* Skip first line - should be #!/bin/bash Shebang */
if (io__get_char(&io) != '#')
goto err_out;
if (io__get_char(&io) != '!')
@@ -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]);