On 9/1/23 10:38 AM, Xu Kuohai wrote:
On 9/1/2023 4:22 PM, Daniel Borkmann wrote:
On 9/1/23 5:10 AM, Xu Kuohai wrote:
From: Xu Kuohai <xukuohai@xxxxxxxxxx>
[...]
Should the error path rather be ?
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
index 2d3bf38677b6..8df8cbb447f1 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
@@ -1454,7 +1454,7 @@ static int vsock_socketpair_connectible(int sotype, int *v0, int *v1)
if (poll_connect(c, IO_TIMEOUT_SEC) < 0) {
FAIL_ERRNO("poll_connect");
- goto close_cli;
+ goto close_acc;
}
*v0 = p;
@@ -1462,6 +1462,8 @@ static int vsock_socketpair_connectible(int sotype, int *v0, int *v1)
return 0;
+close_acc:
+ close(p);
close_cli:
close(c);
close_srv:
Let me know and I'll squash this into the fix.
Right, the accepted connection should be closed, thanks.
Ok, done, pushed.