aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/multi.c5
1 files 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;
}