public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] libbpf: fix error handling in btf__distill_base()
@ 2024-06-29 10:00 Alan Maguire
  2024-06-29 10:04 ` Alan Maguire
  2024-07-01 15:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Maguire @ 2024-06-29 10:00 UTC (permalink / raw)
  To: andrii, eddyz87
  Cc: ast, daniel, jolsa, martin.lau, song, yonghong.song,
	john.fastabend, kpsingh, sdf, haoluo, bpf, Alan Maguire

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

Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
 tools/lib/bpf/btf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index cd5dd6619214..32c00db3b91b 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -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;
 	}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-01 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29 10:00 [PATCH bpf-next] libbpf: fix error handling in btf__distill_base() Alan Maguire
2024-06-29 10:04 ` Alan Maguire
2024-07-01 15:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox