summaryrefslogtreecommitdiff
path: root/tools/perf/util/cs-etm.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2023-06-12 16:04:24 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-06-12 18:18:13 -0300
commit0d98a7af4b12ae7ea78075240a66c21e5d3d9325 (patch)
treed7b9bb7216603ba00f468afe33ed2adfd11378eb /tools/perf/util/cs-etm.c
parent922db21d7e094c363313f9787acdd47d774651af (diff)
perf map: Fix double 'struct map' reference free found with -DREFCNT_CHECKING=1
When quitting after running a 'perf report', the refcount checker finds some double frees. The issue is that map__put() is called on a function argument so it removes the refcount wrapper that someone else was using. Fix it by only calling map__put() on a reference that is owned by this function. Committer notes: Narrowed the map_ref scope as suggested by Ian, removed the symbol-elf part as it was already fixed by another patch, from Ian. Signed-off-by: James Clark <james.clark@arm.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230612150424.198914-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cs-etm.c')
0 files changed, 0 insertions, 0 deletions