Commit 11a8778e authored by Dan Fandrich's avatar Dan Fandrich
Browse files

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.
parent a330bab3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)