diff options
author | Yang Tse <yangsita@gmail.com> | 2008-10-17 12:49:02 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-10-17 12:49:02 +0000 |
commit | 2ea70a5c73561b4b0ecf033edb17d4db8317407e (patch) | |
tree | cb3173cf090d69db2b49ed50f5016cfd0059a8ea /lib/hostip.c | |
parent | eb612bfdfc2801ddb44c5db3352beb867b5c4868 (diff) | |
download | curl-2ea70a5c73561b4b0ecf033edb17d4db8317407e.tar.gz |
OOM condition fix
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 2fd99ef9f..95029e6b2 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; } |