Skip to content
Commit 243b4cda authored by Nikita V. Shirokov's avatar Nikita V. Shirokov Committed by Daniel Borkmann
Browse files

bpf, libbpf: fixing leak when kernel does not support btf

We could end up in situation when we have object file w/ all btf
info, but kernel does not support btf yet. In this situation
currently libbpf just set obj->btf to NULL w/o freeing it first.
This patch is fixing it by making sure to run btf__free first.

Fixes: d29d87f7

 ("btf: separate btf creation and loading")
Signed-off-by: default avatarNikita V. Shirokov <tehnerd@tehnerd.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 20182390
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment