mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/4] perf test: Directory file descriptor leak
@ 2025-06-17 22:33 Ian Rogers
  2025-06-17 22:33 ` [PATCH v2 2/4] perf evsel: Missed close when probing hybrid core PMUs Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ian Rogers @ 2025-06-17 22:33 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,
	Jiapeng Chong, Andi Kleen, 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.rc2.761.g2dc52ea45b-goog


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-17 22:33 [PATCH v2 1/4] perf test: Directory file descriptor leak Ian Rogers
2025-06-17 22:33 ` [PATCH v2 2/4] perf evsel: Missed close when probing hybrid core PMUs Ian Rogers
2025-06-17 22:33 ` [PATCH v2 3/4] perf trace: Add missed freeing of ordered events and thread Ian Rogers
2025-06-17 22:33 ` [PATCH v2 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

all inboxes | Powered by JetHome®