From b3d91a147f2efc274c921fa21dac6f419283abca Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 21 Dec 2012 19:48:07 +0100 Subject: multi.c: OOM handling fix --- lib/multi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- cgit v1.2.3