From: Yang Tse Date: Fri, 21 Dec 2012 18:48:07 +0000 (+0100) Subject: multi.c: OOM handling fix X-Git-Tag: curl-7_29_0~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3d91a147f2efc274c921fa21dac6f419283abca;p=curl multi.c: OOM handling fix --- diff --git a/lib/multi.c b/lib/multi.c index a1dd70513..2905a1346 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -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; }