linux_dsm_epyc7002/tools/perf/tests
Riccardo Mancini 0d90d8492f perf test bpf: Free obj_buf
commit 937654ce497fb6e977a8c52baee5f7d9616302d9 upstream.

ASan reports some memory leaks when running:

  # perf test "42: BPF filter"

The first of these leaks is caused by obj_buf never being deallocated in
__test__bpf.

This patch adds the missing free.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Fixes: ba1fae431e ("perf test: Add 'perf test BPF'")
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>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lore.kernel.org/lkml/60f3ca935fe6672e7e866276ce6264c9e26e4c87.1626343282.git.rickyman7@gmail.com
[ Added missing stdlib.h include ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-25 14:36:21 +02:00
..
attr perf test: Leader sampling shouldn't clear sample period 2020-09-14 19:35:22 -03:00
shell perf test: Update branch sample pattern for cs-etm 2020-11-12 17:55:42 -03:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
api-io.c tools api: Add a lightweight buffered reading api 2020-04-30 10:48:28 -03:00
attr.c perf tests: Call test_attr__open() directly 2020-09-10 11:55:37 -03:00
attr.py perf script python: Add Python3 support to tests/attr.py 2019-02-05 10:31:08 -03:00
backward-ring-buffer.c perf tests: Fix out of bounds memory access 2019-11-07 09:04:22 -03: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-03-02 11:15:07 -03:00
bp_signal_overflow.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
bp_signal.c perf test: Fix the "signal" test inline assembly 2020-09-14 18:26:45 -03:00
bpf-script-example.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-kbuild.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-prologue.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-relocation.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf.c perf test bpf: Free obj_buf 2021-07-25 14:36:21 +02:00
Build perf test: Add expand cgroup event test 2020-09-28 09:21:05 -03:00
builtin-test.c perf test: Add expand cgroup event test 2020-09-28 09:21:05 -03:00
clang.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
code-reading.c perf evlist: Fix the class prefix for 'struct evlist' strerror methods 2020-06-22 16:28:09 -03:00
cpumap.c perf test: Fix test case Merge cpu map 2020-01-30 11:55:02 +01:00
demangle-java-test.c perf tests: Add test for the java demangler 2020-05-28 10:03:28 -03:00
dso-data.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
dwarf-unwind.c perf tools: Remove broken __no_tail_call attribute 2020-11-03 08:32:15 -03:00
event_update.c perf evsel: Rename *perf_evsel__*name() to *evsel__*name() 2020-05-05 16:35:30 -03:00
event-times.c perf evsel: Rename perf_evsel__open_per_*() to evsel__open_per_*() 2020-05-05 16:35:30 -03:00
evsel-roundtrip-name.c perf evsel: Rename perf_evsel__[hs]w_cache* to evsel__[hs]w_cache* 2020-05-28 10:03:24 -03:00
evsel-tp-sched.c perf evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -03:00
expand-cgroup.c perf test: Use generic event for expand_libpfm_events() 2020-12-30 11:53:01 +01:00
expr.c perf metric: Add 'struct expr_id_data' to keep expr value 2020-07-17 09:09:48 -03:00
fdarray.c libperf: Add flags to fdarray fds objects 2020-07-21 09:52:51 -03:00
genelf.c perf jit: Move test functionality in to a test 2019-11-29 12:20:45 -03:00
hists_common.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
hists_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hists_cumulate.c perf evsel: Rename perf_evsel__resort*() to evsel__resort*() 2020-05-28 10:03:24 -03:00
hists_filter.c perf evsel: Rename perf_evsel__resort*() to evsel__resort*() 2020-05-28 10:03:24 -03:00
hists_link.c libperf: Add perf_evlist__first()/last() functions 2019-09-25 09:51:48 -03:00
hists_output.c perf evsel: Rename perf_evsel__resort*() to evsel__resort*() 2020-05-28 10:03:24 -03:00
is_printable_array.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keep-tracking.c libperf: Adopt perf_mmap__read_event() from tools/perf 2019-10-10 11:49:46 -03:00
kmod-path.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
llvm.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
llvm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
make perf tools: Add build test with GTK+ 2020-09-09 11:12:10 -03:00
maps.c perf tests: Rename tests/map_groups.c to tests/maps.c 2019-11-26 11:07:46 -03:00
mem2node.c perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
mem.c perf symbols: Move mem_info and branch_info out of symbol.h 2019-08-31 22:27:48 -03:00
mmap-basic.c perf evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -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 counts: Rename perf_evsel__*counts() to evsel__*counts() 2020-05-28 10:03:24 -03:00
openat-syscall-tp-fields.c perf evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -03:00
openat-syscall.c perf evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -03:00
parse-events.c perf tools: Add support for exclusive groups/events 2020-10-14 12:24:28 -03:00
parse-metric.c perf test: Fix msan uninitialized use. 2020-09-28 09:24:01 -03:00
parse-no-sample-id-all.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
pe-file-parsing.c perf tools: Pass build_id object to filename__read_build_id() 2020-10-14 08:45:16 -03:00
pe-file.c perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
pe-file.exe perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
pe-file.exe.debug perf tests: Add test for PE binary format support 2020-09-04 14:38:15 -03:00
perf-hooks.c perf tests: Avoid raising SEGV using an obvious NULL dereference 2019-09-27 09:26:14 -03:00
perf-record.c perf script: Show text poke address symbol 2020-07-10 08:39:14 -03:00
perf-targz-src-pkg License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pfm.c perf tools: Add optional support for libpfm4 2020-05-29 16:51:38 -03:00
pmu-events.c perf test: Fix metric parsing test 2020-12-30 11:53:54 +01:00
pmu.c perf test: Free formats for perf pmu parse test 2020-09-15 09:22:42 -03:00
python-use.c perf tests: Show python test script in verbose mode 2020-10-13 16:22:03 -03:00
sample-parsing.c perf test: Fix unaligned access in sample parsing test 2021-03-04 11:38:10 +01:00
sdt.c perf tools: Pass build_id object to build_id__sprintf() 2020-10-14 08:46:22 -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 evsel: Rename perf_evsel__new*() to evsel__new*() 2020-05-28 10:03:24 -03:00
switch-tracking.c perf evsel: Rename perf_evsel__{str,int}val() and other tracepoint field metehods to to evsel__*() 2020-05-05 16:35:30 -03:00
task-exit.c perf test: Avoid infinite loop for task exit case 2019-10-15 08:36:22 -03:00
tests.h perf test: Add expand cgroup event test 2020-09-28 09:21:05 -03:00
thread-map.c perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
thread-maps-share.c perf tests: Rename thread-mg-share to thread-maps-share 2019-11-26 11:07:46 -03:00
time-utils-test.c perf evlist: Rename struct perf_evlist to struct evlist 2019-07-29 18:34:42 -03:00
topology.c perf test session topology: Fix data path 2020-04-23 11:08:24 -03:00
unit_number__scnprintf.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
vmlinux-kallsyms.c perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
wp.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00