From: Anders Bakken Date: Tue, 1 Mar 2016 22:52:38 +0000 (-0800) Subject: url: if Curl_done is premature then pipeline not in use X-Git-Tag: curl-7_48_0~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c2ef2a610814028a8dc9469b350d291327c673f;p=thirdparty%2Fcurl.git url: if Curl_done is premature then pipeline not in use Prevent a crash if 2 (or more) requests are made to the same host and pipelining is enabled and the connection does not complete. Bug: https://github.com/curl/curl/pull/690 --- diff --git a/lib/url.c b/lib/url.c index bf293a4d97..9ffca16d1c 100644 --- a/lib/url.c +++ b/lib/url.c @@ -6157,7 +6157,8 @@ CURLcode Curl_done(struct connectdata **connp, result = CURLE_ABORTED_BY_CALLBACK; } - if((conn->send_pipe->size + conn->recv_pipe->size != 0 && + if((!premature && + conn->send_pipe->size + conn->recv_pipe->size != 0 && !data->set.reuse_forbid && !conn->bits.close)) { /* Stop if pipeline is not empty and we do not have to close