selftests/bpf: Fix missing allocation null checks in test_progs.c

Add null checks after memory allocations to prevent potential segmentation faults.

Fixes: 79b4535013 ("tools/bpf: add a test for bpf_get_stack with tracepoint prog")
Fixes: 0925225956 ("bpf/selftests: Add granular subtest output for prog_test")
Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
Link: https://lore.kernel.org/bpf/20260723085100.482147-4-yangfeng59949@163.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Feng Yang 2026-07-23 16:50:58 +08:00 • committed by Kumar Kartikeya Dwivedi
commit 12b362b2f0
No known key found for this signature in database
GPG key ID: 472D377B63542F83