Skip to content
Snippets Groups Projects
Commit c709cffb authored by Zhen Lei's avatar Zhen Lei Committed by Greg Kroah-Hartman
Browse files

bpftool: Fix error return value in build_btf_type_table


[ Upstream commit 68878a5c ]

An appropriate return value should be set on the failed path.

Fixes: 4d374ba0 ("tools: bpftool: implement "bpftool btf show|list"")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201124104100.491-1-thunder.leizhen@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5d06e9cb
3 merge requests!337Remove vdo part of tps6598x_rx_identity_reg struct,!302Pureos/byzantium updates,!283Stable/5.9.15
......@@ -693,6 +693,7 @@ build_btf_type_table(struct btf_attach_table *tab, enum bpf_obj_type type,
obj_node = calloc(1, sizeof(*obj_node));
if (!obj_node) {
p_err("failed to allocate memory: %s", strerror(errno));
err = -ENOMEM;
goto err_free;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment