aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-12-21 19:48:07 +0100
committerYang Tse <yangsita@gmail.com>2012-12-21 19:48:07 +0100
commitb3d91a147f2efc274c921fa21dac6f419283abca (patch)
treea29904a9d3ccee27cd9e9e7a0418466dd9286f6d /lib
parentc59c5e8ea28a3a8039fe5c35256d5fc2884bc5f9 (diff)
multi.c: OOM handling fix
Diffstat (limited to 'lib')
-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;
}