mirror of
https://github.com/curl/curl.git
synced 2025-09-18 10:02:45 +03:00
Curl_connect_done: handle being called twice
Follow-up to f0b7099a10
When torture testing 1021, it turns out the Curl_connect_done function
might be called twice and that previously then wrongly cleared the HTTP
pointer in the second invoke.
Closes #7999
This commit is contained in:
parent
b589696f03
commit
b89a4b5191
|
@ -207,7 +207,8 @@ void Curl_connect_done(struct Curl_easy *data)
|
||||||
Curl_dyn_free(&s->rcvbuf);
|
Curl_dyn_free(&s->rcvbuf);
|
||||||
Curl_dyn_free(&s->req);
|
Curl_dyn_free(&s->req);
|
||||||
|
|
||||||
/* restore the protocol pointer */
|
/* restore the protocol pointer, if not already done */
|
||||||
|
if(s->prot_save)
|
||||||
data->req.p.http = s->prot_save;
|
data->req.p.http = s->prot_save;
|
||||||
s->prot_save = NULL;
|
s->prot_save = NULL;
|
||||||
data->info.httpcode = 0; /* clear it as it might've been used for the
|
data->info.httpcode = 0; /* clear it as it might've been used for the
|
||||||
|
|
Loading…
Reference in New Issue
Block a user