linux-yocto/tools/bpf
Yuan Chen 04059932fb bpftool: Fix JSON writer resource leak in version command
[ Upstream commit 85cd83fed8 ]

When using `bpftool --version -j/-p`, the JSON writer object
created in do_version() was not properly destroyed after use.
This caused a memory leak each time the version command was
executed with JSON output.

Fix: 004b45c0e5 (tools: bpftool: provide JSON output for all possible commands)

Suggested-by: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20250617132442.9998-1-chenyuan_fl@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:41:18 +02:00
..
bpftool bpftool: Fix JSON writer resource leak in version command 2025-08-20 18:41:18 +02:00
resolve_btfids tools/resolve_btfids: Fix build when cross compiling kernel with clang. 2025-06-10 09:09:27 -07:00
runqslower bpf-next-6.15 2025-03-30 12:43:03 -07:00
.gitignore
bpf_asm.c
bpf_dbg.c
bpf_exp.l
bpf_exp.y
bpf_jit_disasm.c tools/bpf: Fix the wrong format specifier in bpf_jit_disasm 2024-11-11 20:04:59 -08:00
Makefile tools: Remove redundant quiet setup 2025-02-18 16:27:43 -03:00