]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - tools/perf/tests/mem2node.c
perf tools: Use zfree() where applicable
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 4 Jul 2019 15:06:20 +0000 (12:06 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jul 2019 13:13:27 +0000 (10:13 -0300)
commitd8f9da240495b50766239410f9b0c715ca506a67
treea9fb3abcc48a72cd34a9299f081aab497325711f
parent7f7c536f23e6afaa5d5d4b0e0958b0be8922491f
perf tools: Use zfree() where applicable

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: Arnaldo Carvalho de Melo <acme@redhat.com>
33 files changed:
tools/perf/bench/futex-hash.c
tools/perf/bench/futex-lock-pi.c
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/tests/dwarf-unwind.c
tools/perf/tests/expr.c
tools/perf/tests/mem2node.c
tools/perf/tests/thread-map.c
tools/perf/ui/browsers/res_sample.c
tools/perf/ui/browsers/scripts.c
tools/perf/util/annotate.c
tools/perf/util/auxtrace.c
tools/perf/util/cgroup.c
tools/perf/util/cputopo.c
tools/perf/util/cs-etm.c
tools/perf/util/data-convert-bt.c
tools/perf/util/data.c
tools/perf/util/env.c
tools/perf/util/event.c
tools/perf/util/header.c
tools/perf/util/hist.c
tools/perf/util/jitdump.c
tools/perf/util/llvm-utils.c
tools/perf/util/machine.c
tools/perf/util/metricgroup.c
tools/perf/util/probe-event.c
tools/perf/util/s390-cpumsf.c
tools/perf/util/srccode.c
tools/perf/util/stat-shadow.c
tools/perf/util/stat.c
tools/perf/util/symbol-elf.c
tools/perf/util/thread_map.c
tools/perf/util/unwind-libunwind-local.c