diff options
author | Hao Luo <haoluo@google.com> | 2020-09-03 23:05:28 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-04 03:33:31 +0300 |
commit | 95cec14b0308085c028c4d4fb3d09fad3902b4c3 (patch) | |
tree | 84f648ba51fa70be277215e72b2113c532f319d4 /tools/lib/bpf/libbpf.c | |
parent | b4ff7ad7784689138ca2d9454833afc28cef6a68 (diff) | |
download | linux-95cec14b0308085c028c4d4fb3d09fad3902b4c3.tar.xz |
selftests/bpf: Fix check in global_data_init.
The returned value of bpf_object__open_file() should be checked with
libbpf_get_error() rather than NULL. This fix prevents test_progs from
crash when test_global_data.o is not present.
Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200903200528.747884-1-haoluo@google.com
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions