Skip to content
Commit 369e955b authored by Quentin Monnet's avatar Quentin Monnet Committed by Andrii Nakryiko
Browse files

tools: Free BTF objects at various locations



Make sure to call btf__free() (and not simply free(), which does not
free all pointers stored in the struct) on pointers to struct btf
objects retrieved at various locations.

These were found while updating the calls to btf__get_from_id().

Fixes: 999d82cb ("tools/bpf: enhance test_btf file testing to test func info")
Fixes: 254471e5 ("tools/bpf: bpftool: add support for func types")
Fixes: 7b612e29 ("perf tools: Synthesize PERF_RECORD_* for loaded BPF programs")
Fixes: d56354dc ("perf tools: Save bpf_prog_info and BTF of new BPF programs")
Fixes: 47c09d6a ("bpftool: Introduce "prog profile" command")
Fixes: fa853c4b ("perf stat: Enable counting events for BPF programs")
Signed-off-by: default avatarQuentin Monnet <quentin@isovalent.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210729162028.29512-5-quentin@isovalent.com
parent 6cc93e2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment