diff options
author | Yang Tse <yangsita@gmail.com> | 2011-09-02 00:06:19 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-09-02 00:06:19 +0200 |
commit | 6b59bc180575aebb3fe288b9b0e2e90fa5ea5cb7 (patch) | |
tree | f285241e46a77c62f7560bdad202213e050156f5 /lib | |
parent | 0a5bbb2ac1beea7ecdbfb856c131f3681c87b38f (diff) | |
download | curl-6b59bc180575aebb3fe288b9b0e2e90fa5ea5cb7.tar.gz |
transfer.c: fix loadhostpairs() OOM handling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 4 |
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 */ |