diff options
| author | James Clark <[email protected]> | 2023-06-12 15:04:24 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-06-12 21:18:13 +0000 |
| commit | 0d98a7af4b12ae7ea78075240a66c21e5d3d9325 (patch) | |
| tree | d7b9bb7216603ba00f468afe33ed2adfd11378eb /tools/lib/subcmd/help.c | |
| parent | perf srcline: Optimize comparision against SRCLINE_UNKNOWN (diff) | |
| download | kernel-0d98a7af4b12ae7ea78075240a66c21e5d3d9325.tar.gz kernel-0d98a7af4b12ae7ea78075240a66c21e5d3d9325.zip | |
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 <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/subcmd/help.c')
0 files changed, 0 insertions, 0 deletions
