linux-stable/tools/perf
Christophe JAILLET 432a06b331 perf pmu: Fix a potential memory leak in perf_pmu__lookup()
[ Upstream commit ef5de1613d ]

The commit in Fixes has reordered some code, but missed an error handling
path.

'goto err' now, in order to avoid a memory leak in case of error.

Fixes: f63a536f03 ("perf pmu: Merge JSON events with sysfs at load time")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: kernel-janitors@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/9538b2b634894c33168dfe9d848d4df31fd4d801.1693085544.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:17:14 -04:00
..
arch perf tools improvements and fixes for v6.8: 2024-01-19 14:25:23 -08:00
bench libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() 2023-12-12 14:55:13 -03:00
dlfilters
Documentation perf list: Add output file option 2024-01-26 10:51:49 -03:00
include/perf
jvmti
pmu-events perf vendor events intel: Alderlake/sapphirerapids metric fixes 2024-01-27 16:31:41 -03:00
python
scripts perf scripts python arm-cs-trace-disasm.py: Do not ignore disam first sample 2023-12-20 14:31:59 -03:00
tests perf test shell daemon: Make signal test less racy 2024-01-26 10:51:49 -03:00
trace tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_MNT_ID_UNIQUE 2024-01-26 10:51:48 -03:00
ui perf TUI: Don't ignore job control 2024-01-04 18:29:17 -03:00
util perf pmu: Fix a potential memory leak in perf_pmu__lookup() 2024-03-26 18:17:14 -04:00
.gitignore perf build: Shellcheck support for OUTPUT directory 2023-12-05 15:46:43 -03:00
Build
builtin-annotate.c perf annotate: Add --insn-stat option for debugging 2023-12-23 22:40:17 -03:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c libperf cpumap: Rename perf_cpu_map__empty() to perf_cpu_map__has_any_cpu_or_is_empty() 2023-12-12 14:55:13 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() 2023-12-12 14:55:13 -03:00
builtin-help.c
builtin-inject.c perf record: Lazy load kernel symbols 2023-11-09 13:49:32 -03:00
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-kwork.c perf kwork: Fix a build error on 32-bit 2023-11-21 10:02:38 -08:00
builtin-list.c perf list: Add output file option 2024-01-26 10:51:49 -03:00
builtin-lock.c perf lock: Fix a memory leak on an error path 2023-11-27 10:21:27 -03:00
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Check conflict between '--timestamp-filename' option and pipe mode before recording 2024-03-26 18:17:01 -04:00
builtin-report.c perf report: Support data type profiling 2023-12-23 22:39:42 -03:00
builtin-sched.c
builtin-script.c
builtin-stat.c perf stat: Combine the -A/--no-aggr and --no-merge options 2023-12-14 18:24:38 -03:00
builtin-timechart.c
builtin-top.c perf top: Remove needless malloc(0) call that triggers -Walloc-size 2024-01-26 12:06:12 -03:00
builtin-trace.c perf env: Introduce perf_env__arch_strerrno() 2023-12-04 16:42:09 -03:00
builtin-version.c
builtin.h
check-headers.sh
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf probe: Convert to check dwarf_getcfi feature 2023-11-10 09:04:21 -03:00
Makefile.perf perf bpf: Clean up the generated/copied vmlinux.h 2024-03-26 18:17:02 -04:00
MANIFEST tools perf: Add arm64 sysreg files to MANIFEST 2023-11-22 11:17:53 -08:00
perf-archive.sh perf archive: Add new option '--unpack' to expand tarballs 2023-12-20 13:20:45 -03:00
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Add --debug-file option to redirect debug output 2023-11-28 14:14:53 -03:00
perf.h