mirror of
https://github.com/curl/curl.git
synced 2026-07-16 06:57:16 +03:00
cf-socket: if FD_CLOEXEC fails on accepted socket, cleanup
Follow-up to 9d7b532404
Pointed out by ZeroPath
Closes #19098
This commit is contained in:
parent
fbff1d5b90
commit
c0564ceb3a
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue