1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

transfer.c: fix loadhostpairs() OOM handling

This commit is contained in:
Yang Tse 2011-09-02 00:06:19 +02:00
parent 0a5bbb2ac1
commit 6b59bc1805

View File

@ -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 */