[PATCH v1] perf tests kallsyms: Fix missed map__put

Ian Rogers posted 1 patch 5 days, 14 hours ago
tools/perf/tests/kallsyms-split.c | 1 +
1 file changed, 1 insertion(+)
[PATCH v1] perf tests kallsyms: Fix missed map__put
Posted by Ian Rogers 5 days, 14 hours ago
Issue was caught by leak sanitizer and the test robot.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202512101502.f3819cd3-lkp@intel.com
Fixes: 34e271ae5538 ("perf test: Add kallsyms split test")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 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 bbbc66957e5d..117ed3b70f63 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.52.0.223.gf5cc29aaa4-goog
Re: [PATCH v1] perf tests kallsyms: Fix missed map__put
Posted by James Clark 3 days, 17 hours ago

On 10/12/2025 21:01, Ian Rogers wrote:
> Issue was caught by leak sanitizer and the test robot.
> 
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202512101502.f3819cd3-lkp@intel.com
> Fixes: 34e271ae5538 ("perf test: Add kallsyms split test")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>   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 bbbc66957e5d..117ed3b70f63 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;

Reviewed-by: James Clark <james.clark@linaro.org>