mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
cf-socket: return OOM error if socket() failes due to OOM
Closes #20100
This commit is contained in:
parent
7032982896
commit
19ca87d4e2
1 changed files with 2 additions and 0 deletions
|
|
@ -346,6 +346,8 @@ static CURLcode socket_open(struct Curl_easy *data,
|
||||||
else {
|
else {
|
||||||
/* opensocket callback not set, so simply create the socket now */
|
/* opensocket callback not set, so simply create the socket now */
|
||||||
*sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
|
*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) {
|
if(*sockfd == CURL_SOCKET_BAD) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue