perf tools: Use zfree() where applicable
Arnaldo Carvalho de Melo authored
In places where the equivalent was already being done, i.e.:

   free(a);
   a = NULL;

And in placs where struct members are being freed so that if we have
some erroneous reference to its struct, then accesses to freed members
will result in segfaults, which we can detect faster than use after free
to areas that may still have something seemingly valid.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-jatyoofo5boc1bsvoig6bb6i@git.kernel.org

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
d8f9da24
Name Last commit Last update
..
Documentation perf tools: Fix typos / broken sentences
arch tools lib: Adopt zalloc()/zfree() from tools/perf
bench perf tools: Use zfree() where applicable
examples/bpf perf augmented_raw_syscalls: Move reading filename to the loop
include/bpf perf bpf: Automatically add BTF ELF markers
jvmti tools build: Check if gettid() is available before providing helper
pmu-events perf vendor events intel: Metric fixes for SKX/CLX
python treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 407
scripts perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events
tests perf tools: Use zfree() where applicable
trace perf trace: Beautify 'sync_file_range' arguments
ui perf tools: Use zfree() where applicable
util perf tools: Use zfree() where applicable
.gitignore perf tools: Add trace/beauty/generated/ into .gitignore
Build perf tools: Rename build libperf to perf
CREDITS perf_counter tools: Add CREDITS file for Git contributors
MANIFEST tools lib: Adopt zalloc()/zfree() from tools/perf
Makefile perf tools: Disable parallelism for 'make clean'
Makefile.config perf build: Handle slang being in /usr/include and in /usr/include/slang/
Makefile.perf Merge tag 'v5.2-rc3' into perf/core, to pick up fixes
builtin-annotate.c tools lib: Adopt zalloc()/zfree() from tools/perf
builtin-bench.c tools lib: Adopt zalloc()/zfree() from tools/perf
builtin-buildid-cache.c perf data: Add global path holder
builtin-buildid-list.c perf data: Add global path holder
builtin-c2c.c tools lib: Adopt zalloc()/zfree() from tools/perf
builtin-config.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c
builtin-report.c
builtin-sched.c
builtin-script.c
builtin-stat.c
builtin-timechart.c
builtin-top.c
builtin-trace.c
builtin-version.c
builtin.h
check-headers.sh
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c
perf.h