summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-02 00:06:19 +0200
committerYang Tse <yangsita@gmail.com>2011-09-02 00:06:19 +0200
commit6b59bc180575aebb3fe288b9b0e2e90fa5ea5cb7 (patch)
treef285241e46a77c62f7560bdad202213e050156f5 /lib
parent0a5bbb2ac1beea7ecdbfb856c131f3681c87b38f (diff)
downloadcurl-6b59bc180575aebb3fe288b9b0e2e90fa5ea5cb7.tar.gz
transfer.c: fix loadhostpairs() OOM handling
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 2f4b69cf8..def0e6ade 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1437,8 +1437,10 @@ static CURLcode loadhostpairs(struct SessionHandle *data)
if(data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
- if(!dns)
+ if(!dns) {
+ Curl_freeaddrinfo(addr);
return CURLE_OUT_OF_MEMORY;
+ }
}
}
data->change.resolve = NULL; /* dealt with now */