From 11a8778e0b720a1683dabdfe7d2b21f6dcb138fd Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 28 Aug 2017 23:41:04 +0200 Subject: [PATCH] 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. --- lib/asyn-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 8936b6033..fa47f554a 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)