mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
selftests/bpf: Fix btf leak on new btf alloc failure in btf_distill test
Fix btf leak on new btf alloc failure in btf_distill test.
Fixes: affdeb5061 ("selftests/bpf: Extend distilled BTF tests to cover BTF relocation")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250115100241.4171581-1-pulehui@huaweicloud.com
This commit is contained in:
parent
7c311b7cb3
commit
4a04cb326a
|
|
@ -385,7 +385,7 @@ static void test_distilled_base_missing_err(void)
|
|||
"[2] INT 'int' size=8 bits_offset=0 nr_bits=64 encoding=SIGNED");
|
||||
btf5 = btf__new_empty();
|
||||
if (!ASSERT_OK_PTR(btf5, "empty_reloc_btf"))
|
||||
return;
|
||||
goto cleanup;
|
||||
btf__add_int(btf5, "int", 4, BTF_INT_SIGNED); /* [1] int */
|
||||
VALIDATE_RAW_BTF(
|
||||
btf5,
|
||||
|
|
@ -478,7 +478,7 @@ static void test_distilled_base_multi_err2(void)
|
|||
"[1] INT 'int' size=4 bits_offset=0 nr_bits=32 encoding=SIGNED");
|
||||
btf5 = btf__new_empty();
|
||||
if (!ASSERT_OK_PTR(btf5, "empty_reloc_btf"))
|
||||
return;
|
||||
goto cleanup;
|
||||
btf__add_int(btf5, "int", 4, BTF_INT_SIGNED); /* [1] int */
|
||||
btf__add_int(btf5, "int", 4, BTF_INT_SIGNED); /* [2] int */
|
||||
VALIDATE_RAW_BTF(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user