aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorHao Ge <[email protected]>2024-08-20 10:36:22 +0800
committerAlexei Starovoitov <[email protected]>2024-08-28 08:44:29 -0700
commitc264487e5410e5a72db8a414566ab7d144223e6c (patch)
tree4dcf63420a3daf22032555515621ec30a287a258 /tools/testing/selftests/bpf/progs/test_autoload.c
parent4961d8f47b140a9b48c63de091f99dbf7b32a23b (diff)
selftests/bpf: Fix incorrect parameters in NULL pointer checking
Smatch reported the following warning: ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program() warn: variable dereferenced before check 'buf' (see line 454) It seems correct,so let's modify it based on it's suggestion. Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer check in get_xlated_program()") fixed an issue in the test_verifier.c once,but it was reverted this time. Let's solve this issue with the minimal changes possible. Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper") Signed-off-by: Hao Ge <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions