Skip to content

Commit 7fdc33f

Browse files
captain5050acmel
authored andcommitted
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: f649ed8 ("perf dsos: Tidy reference counting and locking") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Cc: Changbin Du <changbin.du@huawei.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Link: https://lore.kernel.org/r/20240506180104.485674-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent ee756ef commit 7fdc33f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/perf/util/map.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,
200200
dso__set_build_id(dso, dso__bid(header_bid_dso));
201201
dso__set_header_build_id(dso, 1);
202202
}
203+
dso__put(header_bid_dso);
203204
}
204205
dso__put(dso);
205206
}

0 commit comments

Comments
 (0)