selftests/bpf: Destroy XDP link correctly
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 7 Nov 2021 16:55:20 +0000 (08:55 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 7 Nov 2021 17:14:15 +0000 (09:14 -0800)
commitf91231eeeed752119f49eb6620cae44ec745a007
tree59b6dc423bef1504e4fdb7be307cf1b8546aa4f2
parentf92321d706a810b89a905e04658e38931c4bb0e0
selftests/bpf: Destroy XDP link correctly

bpf_link__detach() was confused with bpf_link__destroy() and leaves
leaked FD in the process. Fix the problem.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Hengqi Chen <hengqi.chen@gmail.com>
Link: https://lore.kernel.org/bpf/20211107165521.9240-9-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c