From: Dan Fandrich Date: Mon, 28 Aug 2017 21:41:04 +0000 (+0200) Subject: asyn-thread: Set errno to the proper value ENOMEM in OOM situation X-Git-Tag: curl-7_56_0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11a8778e0b720a1683dabdfe7d2b21f6dcb138fd;p=thirdparty%2Fcurl.git asyn-thread: Set errno to the proper value ENOMEM in OOM situation 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. --- diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 8936b60331..fa47f554a3 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -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)