multi.c: OOM handling fix

This commit is contained in:
Yang Tse 2012-12-21 19:48:07 +01:00
parent c59c5e8ea2
commit b3d91a147f
1 changed files with 3 additions and 2 deletions

View File

@ -1616,8 +1616,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
newurl = data->req.location;
data->req.location = NULL;
easy->result = Curl_follow(data, newurl, FOLLOW_FAKE);
newurl = NULL; /* allocation was handed over */
if(easy->result)
if(CURLE_OK == easy->result)
newurl = NULL; /* allocation was handed over Curl_follow() */
else
disconnect_conn = TRUE;
}