[PATCH 6.19 014/844] perf tests kallsyms: Fix missed map__put()

From: Sasha Levin

Date: Sat Feb 28 2026 - 12:37:57 EST


From: Ian Rogers <irogers@xxxxxxxxxx>

[ Upstream commit a58807adbed5f532efb231e5490767f284f237c0 ]

Issue was caught by leak sanitizer and the test robot.

Fixes: 34e271ae55382fbd ("perf test: Add kallsyms split test")
Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
Reviewed-by: James Clark <james.clark@xxxxxxxxxx>
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Closes: https://lore.kernel.org/oe-lkp/202512101502.f3819cd3-lkp@xxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
tools/perf/tests/kallsyms-split.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/tests/kallsyms-split.c b/tools/perf/tests/kallsyms-split.c
index bbbc66957e5d0..117ed3b70f630 100644
--- a/tools/perf/tests/kallsyms-split.c
+++ b/tools/perf/tests/kallsyms-split.c
@@ -148,6 +148,7 @@ static int test__kallsyms_split(struct test_suite *test __maybe_unused,
ret = TEST_OK;

out:
+ map__put(map);
remove_proc_dir(0);
machine__exit(&m);
return ret;
--
2.51.0