public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/4] perf stat: Fix affinity memory leaks on error path
@ 2024-09-24 20:29 Ian Rogers
  2024-09-24 20:29 ` [PATCH v1 2/4] perf test: Fix memory leaks on event-times error paths Ian Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Rogers @ 2024-09-24 20:29 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, linux-perf-users,
	linux-kernel

Missed cleanup when an error occurs.

Fixes: 49de179577e7 ("perf stat: No need to setup affinities when starting a workload")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-stat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 689a3d43c258..cc55df3ccb18 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -767,6 +767,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 
 			switch (stat_handle_error(counter)) {
 			case COUNTER_FATAL:
+				affinity__cleanup(affinity);
 				return -1;
 			case COUNTER_RETRY:
 				goto try_again;
@@ -808,6 +809,7 @@ static int __run_perf_stat(int argc, const char **argv, int run_idx)
 
 				switch (stat_handle_error(counter)) {
 				case COUNTER_FATAL:
+					affinity__cleanup(affinity);
 					return -1;
 				case COUNTER_RETRY:
 					goto try_again_reset;
-- 
2.46.0.792.g87dc391469-goog


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

end of thread, other threads:[~2024-09-30 21:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 20:29 [PATCH v1 1/4] perf stat: Fix affinity memory leaks on error path Ian Rogers
2024-09-24 20:29 ` [PATCH v1 2/4] perf test: Fix memory leaks on event-times error paths Ian Rogers
2024-09-24 20:29 ` [PATCH v1 3/4] perf test: Skip not fail tp fields test when insufficient permissions Ian Rogers
2024-09-24 20:29 ` [PATCH v1 4/4] perf test: Skip not fail syscall " Ian Rogers
2024-09-30 21:03 ` [PATCH v1 1/4] perf stat: Fix affinity memory leaks on error path Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox