libbpf: Fix huge memory leak in libbpf_find_vmlinux_btf_id()
authorAndrii Nakryiko <andriin@fb.com>
Wed, 29 Apr 2020 01:21:08 +0000 (18:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 29 Apr 2020 02:48:05 +0000 (19:48 -0700)
commit3521ffa2ee9a48c3236c93f54ae11c074490ebce
tree77d887266884f290af1c02cdb5ec7fab10157896
parent13c908495e5d51718a6da84ae925fa2aac056380
libbpf: Fix huge memory leak in libbpf_find_vmlinux_btf_id()

BTF object wasn't freed.

Fixes: a6ed02cac690 ("libbpf: Load btf_vmlinux only once per object.")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: KP Singh <kpsingh@google.com>
Link: https://lore.kernel.org/bpf/20200429012111.277390-9-andriin@fb.com
tools/lib/bpf/libbpf.c