diff options
| author | Zhongqiu Han <[email protected]> | 2024-12-05 08:44:58 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-12-10 19:59:32 +0000 |
| commit | 875d22980a062521beed7b5df71fb13a1af15d83 (patch) | |
| tree | b9cc3df4870c3feb5dfa1b9113d364816da4672c /tools/perf/util/env.h | |
| parent | perf jevents: Fix build issue in '*/' in event descriptions (diff) | |
| download | kernel-875d22980a062521beed7b5df71fb13a1af15d83.tar.gz kernel-875d22980a062521beed7b5df71fb13a1af15d83.zip | |
perf header: Fix one memory leakage in process_bpf_btf()
If __perf_env__insert_btf() returns false due to a duplicate btf node
insertion, the temporary node will leak. Add a check to ensure the memory
is freed if the function returns false.
Fixes: a70a1123174ab592 ("perf bpf: Save BTF information as headers to perf.data")
Reviewed-by: Namhyung Kim <[email protected]>
Signed-off-by: Zhongqiu Han <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Yicong Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/env.h')
0 files changed, 0 insertions, 0 deletions
