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: NQuentin Monnet <quentin@isovalent.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210729162028.29512-5-quentin@isovalent.com
Showing
想要评论请 注册 或 登录