1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05: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,10 +1437,12 @@ static CURLcode loadhostpairs(struct SessionHandle *data)
if(data->share) if(data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS); Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
if(!dns) if(!dns) {
Curl_freeaddrinfo(addr);
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;
} }
} }
}
data->change.resolve = NULL; /* dealt with now */ data->change.resolve = NULL; /* dealt with now */
return CURLE_OK; return CURLE_OK;