Loading lib/transfer.c +3 −3 Original line number Diff line number Diff line Loading @@ -1969,7 +1969,7 @@ CURLcode Curl_perform(struct SessionHandle *data) to the new URL */ urlchanged = data->change.url_changed; if ((CURLE_OK == res) && urlchanged) { res = Curl_done(conn, res); res = Curl_done(&conn, res); if(CURLE_OK == res) { char *gotourl = strdup(data->change.url); res = Curl_follow(data, gotourl); Loading Loading @@ -2026,14 +2026,14 @@ CURLcode Curl_perform(struct SessionHandle *data) /* Always run Curl_done(), even if some of the previous calls failed, but return the previous (original) error code */ res2 = Curl_done(conn, res); res2 = Curl_done(&conn, res); if(CURLE_OK == res) res = res2; } else /* Curl_do() failed, clean up left-overs in the done-call */ res2 = Curl_done(conn, res); res2 = Curl_done(&conn, res); /* * Important: 'conn' cannot be used here, since it may have been closed Loading lib/url.c +8 −4 Original line number Diff line number Diff line Loading @@ -3367,12 +3367,13 @@ CURLcode Curl_async_resolved(struct connectdata *conn) } CURLcode Curl_done(struct connectdata *conn, CURLcode Curl_done(struct connectdata **connp, CURLcode status) /* an error if this is called after an error was detected */ { struct SessionHandle *data=conn->data; CURLcode result; struct connectdata *conn = *connp; struct SessionHandle *data=conn->data; /* cleanups done even if the connection is re-used */ Loading Loading @@ -3416,6 +3417,9 @@ CURLcode Curl_done(struct connectdata *conn, CURLcode res2; res2 = Curl_disconnect(conn); /* close the connection */ *connp = NULL; /* to make the caller of this function better detect that this was actually killed here */ /* If we had an error already, make sure we return that one. But if we got a new error, return that. */ if(!result && res2) Loading Loading @@ -3452,9 +3456,9 @@ CURLcode Curl_do(struct connectdata **connp) infof(data, "Re-used connection seems dead, get a new one\n"); conn->bits.close = TRUE; /* enforce close of this connection */ result = Curl_done(conn, result); /* we are so done with this */ result = Curl_done(&conn, result); /* we are so done with this */ /* conn is no longer a good pointer */ /* conn may no longer be a good pointer */ if(CURLE_OK == result) { bool async; Loading lib/url.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ CURLcode Curl_connect(struct SessionHandle *, struct connectdata **, CURLcode Curl_async_resolved(struct connectdata *conn); CURLcode Curl_do(struct connectdata **); CURLcode Curl_do_more(struct connectdata *); CURLcode Curl_done(struct connectdata *, CURLcode); CURLcode Curl_done(struct connectdata **, CURLcode); CURLcode Curl_disconnect(struct connectdata *); CURLcode Curl_protocol_connect(struct connectdata *conn); bool Curl_ssl_config_matches(struct ssl_config_data* data, Loading Loading
lib/transfer.c +3 −3 Original line number Diff line number Diff line Loading @@ -1969,7 +1969,7 @@ CURLcode Curl_perform(struct SessionHandle *data) to the new URL */ urlchanged = data->change.url_changed; if ((CURLE_OK == res) && urlchanged) { res = Curl_done(conn, res); res = Curl_done(&conn, res); if(CURLE_OK == res) { char *gotourl = strdup(data->change.url); res = Curl_follow(data, gotourl); Loading Loading @@ -2026,14 +2026,14 @@ CURLcode Curl_perform(struct SessionHandle *data) /* Always run Curl_done(), even if some of the previous calls failed, but return the previous (original) error code */ res2 = Curl_done(conn, res); res2 = Curl_done(&conn, res); if(CURLE_OK == res) res = res2; } else /* Curl_do() failed, clean up left-overs in the done-call */ res2 = Curl_done(conn, res); res2 = Curl_done(&conn, res); /* * Important: 'conn' cannot be used here, since it may have been closed Loading
lib/url.c +8 −4 Original line number Diff line number Diff line Loading @@ -3367,12 +3367,13 @@ CURLcode Curl_async_resolved(struct connectdata *conn) } CURLcode Curl_done(struct connectdata *conn, CURLcode Curl_done(struct connectdata **connp, CURLcode status) /* an error if this is called after an error was detected */ { struct SessionHandle *data=conn->data; CURLcode result; struct connectdata *conn = *connp; struct SessionHandle *data=conn->data; /* cleanups done even if the connection is re-used */ Loading Loading @@ -3416,6 +3417,9 @@ CURLcode Curl_done(struct connectdata *conn, CURLcode res2; res2 = Curl_disconnect(conn); /* close the connection */ *connp = NULL; /* to make the caller of this function better detect that this was actually killed here */ /* If we had an error already, make sure we return that one. But if we got a new error, return that. */ if(!result && res2) Loading Loading @@ -3452,9 +3456,9 @@ CURLcode Curl_do(struct connectdata **connp) infof(data, "Re-used connection seems dead, get a new one\n"); conn->bits.close = TRUE; /* enforce close of this connection */ result = Curl_done(conn, result); /* we are so done with this */ result = Curl_done(&conn, result); /* we are so done with this */ /* conn is no longer a good pointer */ /* conn may no longer be a good pointer */ if(CURLE_OK == result) { bool async; Loading
lib/url.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ CURLcode Curl_connect(struct SessionHandle *, struct connectdata **, CURLcode Curl_async_resolved(struct connectdata *conn); CURLcode Curl_do(struct connectdata **); CURLcode Curl_do_more(struct connectdata *); CURLcode Curl_done(struct connectdata *, CURLcode); CURLcode Curl_done(struct connectdata **, CURLcode); CURLcode Curl_disconnect(struct connectdata *); CURLcode Curl_protocol_connect(struct connectdata *conn); bool Curl_ssl_config_matches(struct ssl_config_data* data, Loading