WSL2-Linux-Kernel/tools/bpf
Quentin Monnet 77d19bad30 bpftool: Fix memory leak in prog_dump()
[ Upstream commit ebbd7f64a3 ]

Following the extraction of prog_dump() from do_dump(), the struct btf
allocated in prog_dump() is no longer freed on error; the struct
bpf_prog_linfo is not freed at all. Make sure we release them before
exiting the function.

Fixes: ec2025095c ("bpftool: Match several programs with same tag")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211110114632.24537-2-quentin@isovalent.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:03:07 +01:00
..
bpftool bpftool: Fix memory leak in prog_dump() 2022-01-27 11:03:07 +01:00
resolve_btfids tools/resolve_btfids: Emit warnings and patch zero id for missing symbols 2021-07-29 14:37:23 -07:00
runqslower
.gitignore
Makefile tools: bpf: Fix error in 'make -C tools/ bpf_install' 2021-07-07 14:06:38 -07:00
bpf_asm.c
bpf_dbg.c
bpf_exp.l
bpf_exp.y
bpf_jit_disasm.c