diff options
author | Ian Rogers <irogers@google.com> | 2025-06-24 12:03:21 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-15 12:13:51 +0200 |
commit | ea90bb43be7c926203f4a9ae8f256f4fcdaaecd5 (patch) | |
tree | e4f62bd71dd9227e644f3b60f45373160f349221 | |
parent | e9136a4afe3b9bab57d72849ab03d93618afd46b (diff) |
perf dso: Add missed dso__put to dso__load_kcore
[ Upstream commit 63a088e999de3f431f87d9a367933da894ddb613 ]
The kcore loading creates a set of list nodes that have reference
counted references to maps of the kcore. The list node freeing in the
success path wasn't releasing the maps, add the missing puts. It is
unclear why this leak was being missed by leak sanitizer.
Fixes: 83720209961f ("perf map: Move map list node into symbol")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250624190326.2038704-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | tools/perf/util/symbol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 3bbf173ad822..c0ec5ed4f1aa 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1405,6 +1405,7 @@ static int dso__load_kcore(struct dso *dso, struct map *map, goto out_err; } } + map__zput(new_node->map); free(new_node); } |