New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle NULL connection pointer passed in by multi.c #2653
Conversation
lib/url.c
Outdated
@@ -4711,14 +4711,16 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) | |||
{ | |||
struct SingleRequest *k = &data->req; | |||
|
|||
conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to | |||
use */ | |||
if (conn != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we prefer these to be just if(conn)
- and notice the lack of space before the paren!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated as requested.
Please explain why we want this to work like this? Are you saying we end up there without a conn pointer during some situation? |
This happens when using a multi handle. You can find in multi.c where this gets called with a NULL pointer. |
The CI build errors and coverage decrease to 0% are unrelated to these changes. |
Ah right, when using HTTP/2... (when |
Thanks! (I edited it slightly before I merged.) |
Thanks badger! |
No description provided.