mirror of
https://github.com/curl/curl.git
synced 2026-08-02 11:50:29 +03:00
servers: accept unlink() failing due to the file missing
In `bind_unix_socket()`, before retrying `bind()`. This patch uses `ENOENT`. This was last time in source betweend25b050379(2018) anddffd996e3b(2023), and also earlier. Also defined by supported Windows envs. Seems safe to use. Reported-by CodeQL Follow-up to99fb36797aCherry-picked from #22010 Closes #22028
This commit is contained in:
parent
6ce740403e
commit
7d09426187
1 changed files with 1 additions and 1 deletions
|
|
@ -711,7 +711,7 @@ int bind_unix_socket(curl_socket_t sock, const char *unix_socket,
|
|||
}
|
||||
#endif
|
||||
/* dead socket, cleanup and retry bind */
|
||||
if(unlink(unix_socket)) {
|
||||
if(unlink(unix_socket) && errno != ENOENT) {
|
||||
logmsg("Error binding socket, failed to unlink %s: %d (%s)", unix_socket,
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue