diff options
author | Ian Rogers <irogers@google.com> | 2024-02-28 22:20:48 -0800 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2024-02-29 18:06:00 -0800 |
commit | ec42d3d56819688537ec7ee37ce97f695fb8e6d7 (patch) | |
tree | 8a05182638b73f6c18f6ab99b14ab20357d860c9 /tools/perf/util/probe-event.c | |
parent | 1947b92464c3268381604bbe2ac977a3fd78192f (diff) |
perf map: Fix map reference count issues
The find will get the map, ensure puts are done on all paths.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240229062048.558799-1-irogers@google.com
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index be71abe8b9b0..2a0ad9ecf0a2 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2274,9 +2274,7 @@ static int find_perf_probe_point_from_map(struct probe_trace_point *tp, ret = pp->function ? 0 : -ENOMEM; out: - if (map && !is_kprobe) { - map__put(map); - } + map__put(map); return ret; } |