]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
asyn-thread: Set errno to the proper value ENOMEM in OOM situation
authorDan Fandrich <dan@coneharvesters.com>
Mon, 28 Aug 2017 21:41:04 +0000 (23:41 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Mon, 28 Aug 2017 21:55:55 +0000 (23:55 +0200)
This used to be set in some configurations to EAI_MEMORY which is not a
valid value for errno and caused Curl_strerror to fail an assertion.

lib/asyn-thread.c

index 8936b6033161569a2ba8b6580b1a0099521baabf..fa47f554a317009c2f46b4be65b81f2e50c9aaa0 100644 (file)
@@ -380,7 +380,7 @@ static bool init_resolve_thread(struct connectdata *conn,
                                 const struct addrinfo *hints)
 {
   struct thread_data *td = calloc(1, sizeof(struct thread_data));
-  int err = RESOLVER_ENOMEM;
+  int err = ENOMEM;
 
   conn->async.os_specific = (void *)td;
   if(!td)