]> www.infradead.org Git - users/dwmw2/linux.git/commit
libbpf: Fix error handling in btf__distill_base()
authorAlan Maguire <alan.maguire@oracle.com>
Sat, 29 Jun 2024 10:00:58 +0000 (11:00 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 1 Jul 2024 15:05:08 +0000 (17:05 +0200)
commit5b747c23f17d791e08fdf4baa7e14b704625518c
treeab8242d6e3d89a3be472da66390204ad79e4d5f6
parentc77e572d3a8c0e21c5dca4cc2883c7cd8cbe981f
libbpf: Fix error handling in btf__distill_base()

Coverity points out that after calling btf__new_empty_split() the wrong
value is checked for error.

Fixes: 58e185a0dc35 ("libbpf: Add btf__distill_base() creating split BTF with distilled base BTF")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240629100058.2866763-1-alan.maguire@oracle.com
tools/lib/bpf/btf.c