linux-stable/tools
Miaoqian Lin fac5f59fb0 bpftool: Fix memory leak in do_build_table_cb
[ Upstream commit fa55ef14ef ]

strdup() allocates memory for path. We need to release the memory in the
following error path. Add free() to avoid memory leak.

Fixes: 8f184732b6 ("bpftool: Switch to libbpf's hashmap for pinned paths of BPF objects")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221206071906.806384-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:09 +01:00
..
accounting
arch x86/cpu: Restore AMD's DE_CFG MSR after resume 2022-11-16 10:04:14 +01:00
bootconfig
bpf bpftool: Fix memory leak in do_build_table_cb 2022-12-31 13:26:09 +01:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio tools: iio: iio_generic_buffer: Fix read size 2022-12-02 17:43:14 +01:00
include tools/nolibc/string: Fix memcmp() implementation 2022-11-10 18:17:33 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Btf dedup identical struct test needs check for nested structs/arrays 2022-12-31 13:25:52 +01:00
memory-model
objtool objtool, kcsan: Add volatile read/write instrumentation to whitelist 2022-12-31 13:25:36 +01:00
pci
pcmcia
perf perf tools: Add the include/perf/ directory to .gitignore 2022-11-16 10:03:59 +01:00
power
rcu
scripts
spi
testing netfilter: conntrack: set icmpv6 redirects as RELATED 2022-12-31 13:26:06 +01:00
thermal
time
tracing
usb
verification rv/dot2c: Make automaton definition static 2022-10-29 10:08:35 +02:00
virtio
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:30:19 +01:00
wmi
Makefile