diff options
author | Anders Bakken <agbakken@gmail.com> | 2016-03-01 14:52:38 -0800 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-03-01 18:55:04 -0500 |
commit | 3c2ef2a610814028a8dc9469b350d291327c673f (patch) | |
tree | 718c6fadc4fb4d80b128bd0deb42a293e621888f | |
parent | d678bd6f60219ad95f709587ddfee2d4943abba1 (diff) |
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
-rw-r--r-- | lib/url.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |