From: Ian Rogers Date: Mon, 6 May 2024 18:01:01 +0000 (-0700) Subject: perf map: Add missing dso__put() in map__new() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7fdc33f84261466591fc00e66168d9c809e7e4c0;p=linux.git perf map: Add missing dso__put() in map__new() A dso__put() is needed for the dsos__find() when the map is created and a buildid is sought. Fixes: f649ed80f3cabbf1 ("perf dsos: Tidy reference counting and locking") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Changbin Du Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tiezhu Yang Link: https://lore.kernel.org/r/20240506180104.485674-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 117c4bb78b35b..e1d14936a60da 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -200,6 +200,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len, dso__set_build_id(dso, dso__bid(header_bid_dso)); dso__set_header_build_id(dso, 1); } + dso__put(header_bid_dso); } dso__put(dso); }