← Commit list

c0564ceb3a

Daniel Stenberg
Daniel Stenberg
2025-10-17
SUCCESS Duration: 538s

Subject

cf-socket: if FD_CLOEXEC fails on accepted socket, cleanup

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/cf-socket.c+1 -0
@@ -2138,6 +2138,7 @@ static CURLcode cf_tcp_accept_connect(struct Curl_cfilter *cf,
(curlx_nonblock(s_accepted, TRUE) < 0)) {
failf(data, "fcntl set CLOEXEC/NONBLOCK: %s",
curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
+ Curl_socket_close(data, cf->conn, s_accepted);
return CURLE_FTP_ACCEPT_FAILED;
}
#endif