linux/tools/perf/tests
Riccardo Mancini 05804a7d22 perf test event_update: Fix memory leak of evlist
[ Upstream commit fc56f54f6fcd5337634f4545af6459613129b432 ]

ASan reports a memory leak when running:

  # perf test "49: Synthesize attr update"

Caused by evlist not being deleted.

This patch adds the missing evlist__delete and removes the
perf_cpu_map__put since it's already being deleted by evlist__delete.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Fixes: a6e5281780 ("perf tools: Add event_update event unit type")
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/f7994ad63d248f7645f901132d208fadf9f2b7e4.1626343282.git.rickyman7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-28 13:30:54 +02:00
..
attr
shell perf tests: Fix test 68 zstd compression for s390 2020-10-01 13:18:11 +02:00
.gitignore
Build
attr.c
attr.py
backward-ring-buffer.c perf tests: Fix out of bounds memory access 2019-12-17 19:56:23 +01:00
bitmap.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
bp_account.c perf tests bp_account: Make global variable static 2020-08-05 09:59:52 +02:00
bp_signal.c perf test: Fix the "signal" test inline assembly 2020-09-23 12:40:40 +02:00
bp_signal_overflow.c
bpf-script-example.c
bpf-script-test-kbuild.c
bpf-script-test-prologue.c
bpf-script-test-relocation.c
bpf.c perf test bpf: Free obj_buf 2021-07-25 14:35:15 +02:00
builtin-test.c
clang.c
code-reading.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
cpumap.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
dso-data.c
dwarf-unwind.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
event-times.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
event_update.c perf test event_update: Fix memory leak of evlist 2021-07-28 13:30:54 +02:00
evsel-roundtrip-name.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
evsel-tp-sched.c
expr.c
fdarray.c
hists_common.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
hists_common.h
hists_cumulate.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
hists_filter.c
hists_link.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
hists_output.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
is_printable_array.c
keep-tracking.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
kmod-path.c
llvm.c
llvm.h
make perf tests: Fix static build test 2019-09-20 14:37:28 -03:00
map_groups.c
mem.c
mem2node.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
mmap-basic.c perf evlist: Adopt backwards ring buffer state enum 2019-09-25 09:51:45 -03:00
mmap-thread-lookup.c libperf: Move 'page_size' global variable to libperf 2019-09-25 09:51:48 -03:00
openat-syscall-all-cpus.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
openat-syscall-tp-fields.c libperf: Add perf_evlist__poll() function 2019-09-25 09:51:49 -03:00
openat-syscall.c
parse-events.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
parse-no-sample-id-all.c
perf-hooks.c perf tests: Avoid raising SEGV using an obvious NULL dereference 2019-09-27 09:26:14 -03:00
perf-record.c libperf: Add perf_evlist__poll() function 2019-09-25 09:51:49 -03:00
perf-targz-src-pkg
pmu.c perf test: Free formats for perf pmu parse test 2020-09-23 12:40:41 +02:00
python-use.c
sample-parsing.c perf test: Fix unaligned access in sample parsing test 2021-03-04 10:26:35 +01:00
sdt.c perf tools: No need to include internal/lib.h from util/util.h 2019-09-25 09:51:48 -03:00
stat.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
sw-clock.c perf evlist: Adopt backwards ring buffer state enum 2019-09-25 09:51:45 -03:00
switch-tracking.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
task-exit.c perf test: Avoid infinite loop for task exit case 2019-12-31 16:44:06 +01:00
tests.h
thread-map.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
thread-mg-share.c
time-utils-test.c
topology.c perf test session_topology: Delete session->evlist 2021-07-28 13:30:54 +02:00
unit_number__scnprintf.c
vmlinux-kallsyms.c libperf: Move 'page_size' global variable to libperf 2019-09-25 09:51:48 -03:00
wp.c