mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: 58e185a0dc
("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
This commit is contained in:
parent
c77e572d3a
commit
5b747c23f1
1 changed files with 1 additions and 1 deletions
|
@ -5431,7 +5431,7 @@ int btf__distill_base(const struct btf *src_btf, struct btf **new_base_btf,
|
|||
* BTF available.
|
||||
*/
|
||||
new_split = btf__new_empty_split(new_base);
|
||||
if (!new_split_btf) {
|
||||
if (!new_split) {
|
||||
err = -errno;
|
||||
goto done;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue