mirror of
https://github.com/curl/curl.git
synced 2026-04-13 12:41:42 +08:00
cf-socket: return OOM error if socket() failes due to OOM
Closes #20100
This commit is contained in:
parent
7032982896
commit
19ca87d4e2
@ -346,6 +346,8 @@ static CURLcode socket_open(struct Curl_easy *data,
|
||||
else {
|
||||
/* opensocket callback not set, so simply create the socket now */
|
||||
*sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
|
||||
if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if(*sockfd == CURL_SOCKET_BAD) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user