← Commit list

19ca87d4e2

Daniel Stenberg
Daniel Stenberg
2025-12-27
SUCCESS Duration: 200s

Subject

cf-socket: return OOM error if socket() failes due to OOM

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+2 -0
@@ -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) {