Re: [PATCH bpf-next v1 11/14] selftests/bpf: Free bpf_object in test_sysctl

From: Eduard Zingerman

Date: Thu Feb 12 2026 - 19:54:47 EST


On Wed, 2026-02-11 at 17:13 -0800, Ihor Solodrai wrote:
> ASAN reported a resource leak due to the bpf_object not being tracked
> in test_sysctl. Add an out parameter to load_sysctl_prog() to properly
> clean up bpf_object if a program was loaded from a file.
>
> Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
> ---

Maybe make 'obj' a member of the `struct sysctl_test`?

[...]