linux/tools
Ian Rogers b194c9cd09 perf evsel: Fix memory leaks relating to unit
unit may have a strdup pointer or be to a literal, consequently memory
assocciated with it isn't freed. Change it so the unit is always strdup
and so the memory can be safely freed.

Fix related issue in perf_event__process_event_update() for name and
own_cpus. Leaks were spotted by leak sanitizer.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.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: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20211118084749.2191447-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-11-18 10:19:14 -03:00
..
accounting
arch tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources 2021-11-18 10:08:07 -03:00
bootconfig bootconfig: Cleanup dummy headers in tools/bootconfig 2021-10-10 22:16:02 -04:00
bpf bpftool: Install libbpf headers for the bootstrap version, too 2021-11-05 16:19:48 +01:00
build tools build: Fix removal of feature-sync-compare-and-swap feature detection 2021-11-18 10:08:07 -03:00
cgroup
counter tools/counter: Create Counter tools 2021-10-17 10:54:16 +01:00
debugging tools: Fix "the the" in a message in kernel-chktaint 2021-06-13 17:01:17 -06:00
edid
firewire
firmware
gpio
hv
iio
include tools headers UAPI: Sync linux/kvm.h with the kernel sources 2021-11-18 10:08:07 -03:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00
memory-model tools/memory-model: Document data_race(READ_ONCE()) 2021-07-27 11:48:55 -07:00
objtool static_call,x86: Robustify trampoline patching 2021-11-11 13:09:31 +01:00
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia
perf perf evsel: Fix memory leaks relating to unit 2021-11-18 10:19:14 -03:00
power tools/power/x86/intel-speed-select: v1.10 release 2021-06-18 15:29:32 +02:00
rcu tools/rcu: Add an extract-stall script 2021-09-16 10:31:26 -07:00
scripts tools, build: Add RISC-V to HOSTARCH parsing 2021-11-01 17:08:21 +01:00
spi
testing New x86 features: 2021-11-13 10:01:10 -08:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-08-14 15:33:19 +02:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-10-25 22:27:19 -04:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix build 2021-08-11 06:44:24 -04:00
vm tools/vm/page-types.c: print file offset in hexadecimal 2021-11-06 13:30:40 -07:00
wmi
Makefile tools/lib/lockdep: drop liblockdep 2021-11-12 11:07:17 -08:00