linux-stable/tools/bpf
Yuan Chen 868b52651f 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-28 16:28:24 +02:00
..
bpftool bpftool: Fix JSON writer resource leak in version command 2025-08-28 16:28:24 +02:00
resolve_btfids tools/resolve_btfids: Fix build when cross compiling kernel with clang. 2025-06-19 15:28:44 +02:00
runqslower
.gitignore
bpf_asm.c
bpf_dbg.c
bpf_exp.l
bpf_exp.y
bpf_jit_disasm.c
Makefile