selftests/bpf: Use calloc to allocate subtest_states

An early return triggered by read_prog_test_msg leaves uninitialized elements,
which leads to memory corruption during free_test_states cleanup.

Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
Link: https://lore.kernel.org/bpf/20260723085100.482147-5-yangfeng59949@163.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Feng Yang 2026-07-23 16:50:59 +08:00 • committed by Kumar Kartikeya Dwivedi
commit a813ad2185
No known key found for this signature in database
GPG key ID: 472D377B63542F83