linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/4] perf test: Directory file descriptor leak
@ 2025-06-14  0:41 Ian Rogers
  2025-06-14  0:41 ` [PATCH v1 2/4] perf evsel: Missed close when probing hybrid core PMUs Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ian Rogers @ 2025-06-14  0:41 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Michael Petlan, Andi Kleen,
	Jiapeng Chong, Tiezhu Yang, linux-perf-users, linux-kernel

Add missed close when iterating over the script directories.

Fixes: f3295f5b067d ("perf tests: Use scandirat for shell script finding")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/tests-scripts.c | 1 +
 1 file changed, 1 insertion(+)

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]);
-- 
2.50.0.rc1.591.g9c95f17f64-goog


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-06-23 22:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-14  0:41 [PATCH v1 1/4] perf test: Directory file descriptor leak Ian Rogers
2025-06-14  0:41 ` [PATCH v1 2/4] perf evsel: Missed close when probing hybrid core PMUs Ian Rogers
2025-06-16 16:04   ` Ian Rogers
2025-06-16 16:24     ` Arnaldo Carvalho de Melo
2025-06-16 16:30       ` Ian Rogers
2025-06-14  0:41 ` [PATCH v1 3/4] perf trace: Add missed freeing of ordered events and thread Ian Rogers
2025-06-14  4:16   ` Howard Chu
2025-06-16 16:27     ` Arnaldo Carvalho de Melo
2025-06-17 21:30       ` Arnaldo Carvalho de Melo
2025-06-17 21:32         ` Ian Rogers
2025-06-17 21:49           ` Arnaldo Carvalho de Melo
2025-06-23 22:26             ` Ian Rogers
2025-06-14  0:41 ` [PATCH v1 4/4] libperf evsel: In exit add missed puts and assert close, etc. were called Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).