]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Fix memory leak when emitting final btf_ext
authorAndrii Nakryiko <andrii@kernel.org>
Sat, 27 Mar 2021 04:25:02 +0000 (21:25 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Mar 2021 14:38:36 +0000 (07:38 -0700)
commit61174db3ca56705d234b49613e104727374b3350
tree427327f17c4ce85fe062d98b9f1f9a7342b4dd6d
parent0cedca5be64549e573288a62ec01d4fe87379de5
libbpf: Fix memory leak when emitting final btf_ext

Free temporary allocated memory used to construct finalized .BTF.ext data.
Found by Coverity static analysis on libbpf's Github repo.

Fixes: 6c29b3871bd8 ("libbpf: Add BPF static linker BTF and BTF.ext support")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210327042502.969745-1-andrii@kernel.org
tools/lib/bpf/linker.c