diff options
author | Martin KaFai Lau <martin.lau@kernel.org> | 2023-03-16 01:07:26 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-03-16 18:12:59 +0100 |
commit | 226efec2b0efad60d4a6c4b2c3a8710dafc4dc21 (patch) | |
tree | c72275f24419236f372c703d59e33885d3839ba9 /tools/lib | |
parent | selftests/bpf: Use ASSERT_EQ instead ASSERT_OK for testing memcmp result (diff) | |
download | linux-226efec2b0efad60d4a6c4b2c3a8710dafc4dc21.tar.xz linux-226efec2b0efad60d4a6c4b2c3a8710dafc4dc21.zip |
selftests/bpf: Fix a fd leak in an error path in network_helpers.c
In __start_server, it leaks a fd when setsockopt(SO_REUSEPORT) fails.
This patch fixes it.
Fixes: eed92afdd14c ("bpf: selftest: Test batching and bpf_(get|set)sockopt in bpf tcp iter")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20230316000726.1016773-2-martin.lau@linux.dev
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions