From: Yang Tse Date: Fri, 17 Oct 2008 12:49:02 +0000 (+0000) Subject: OOM condition fix X-Git-Tag: curl-7_19_1~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ea70a5c73561b4b0ecf033edb17d4db8317407e;p=thirdparty%2Fcurl.git OOM condition fix --- diff --git a/lib/hostip.c b/lib/hostip.c index 2fd99ef9f1..95029e6b21 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -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; }