Commit 2ea70a5c authored by Yang Tse's avatar Yang Tse
Browse files

OOM condition fix

parent eb612bfd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -928,8 +928,10 @@ Curl_addrinfo *Curl_he2ai(const struct hostent *he, int port)
    prevai = ai;
  }

  if(result != CURLE_OK)
  if(result != CURLE_OK) {
    Curl_freeaddrinfo(firstai);
    firstai = NULL;
  }

  return firstai;
}