multi.c: OOM handling fixes making torture tests 560 580 581 pass
This commit is contained in:
@@ -1041,7 +1041,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
/* Add this handle to the send or pend pipeline */
|
/* Add this handle to the send or pend pipeline */
|
||||||
easy->result = addHandleToSendOrPendPipeline(data,
|
easy->result = addHandleToSendOrPendPipeline(data,
|
||||||
easy->easy_conn);
|
easy->easy_conn);
|
||||||
if(CURLE_OK == easy->result) {
|
if(CURLE_OK != easy->result)
|
||||||
|
disconnect_conn = TRUE;
|
||||||
|
else {
|
||||||
if(async)
|
if(async)
|
||||||
/* We're now waiting for an asynchronous name lookup */
|
/* We're now waiting for an asynchronous name lookup */
|
||||||
multistate(easy, CURLM_STATE_WAITRESOLVE);
|
multistate(easy, CURLM_STATE_WAITRESOLVE);
|
||||||
@@ -1539,9 +1541,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
newurl = data->req.location;
|
newurl = data->req.location;
|
||||||
data->req.location = NULL;
|
data->req.location = NULL;
|
||||||
easy->result = Curl_follow(data, newurl, FOLLOW_FAKE);
|
easy->result = Curl_follow(data, newurl, FOLLOW_FAKE);
|
||||||
if(easy->result)
|
if(easy->result) {
|
||||||
|
disconnect_conn = TRUE;
|
||||||
free(newurl);
|
free(newurl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
multistate(easy, CURLM_STATE_DONE);
|
multistate(easy, CURLM_STATE_DONE);
|
||||||
result = CURLM_CALL_MULTI_PERFORM;
|
result = CURLM_CALL_MULTI_PERFORM;
|
||||||
|
|||||||
Reference in New Issue
Block a user