We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adea906 commit cfee98dCopy full SHA for cfee98d
tools/testing/selftests/bpf/prog_tests/core_reloc.c
@@ -861,7 +861,7 @@ static void run_core_reloc_tests(bool use_btfgen)
861
struct bpf_link *link = NULL;
862
struct bpf_map *data_map;
863
struct bpf_program *prog;
864
- struct bpf_object *obj;
+ struct bpf_object *obj = NULL;
865
uint64_t my_pid_tgid;
866
struct data *data;
867
void *mmap_data = NULL;
@@ -992,7 +992,8 @@ static void run_core_reloc_tests(bool use_btfgen)
992
remove(btf_file);
993
bpf_link__destroy(link);
994
link = NULL;
995
- bpf_object__close(obj);
+ if (obj)
996
+ bpf_object__close(obj);
997
}
998
999
0 commit comments