mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
http_proxy: restore the protocol pointer on error
Reported-by: Trail of Bits Closes #9790
This commit is contained in:
parent
9d0869d234
commit
55e1875729
@ -212,10 +212,8 @@ void Curl_connect_done(struct Curl_easy *data)
|
||||
Curl_dyn_free(&s->rcvbuf);
|
||||
Curl_dyn_free(&s->req);
|
||||
|
||||
/* restore the protocol pointer, if not already done */
|
||||
if(s->prot_save)
|
||||
data->req.p.http = s->prot_save;
|
||||
s->prot_save = NULL;
|
||||
/* restore the protocol pointer */
|
||||
data->req.p.http = s->prot_save;
|
||||
data->info.httpcode = 0; /* clear it as it might've been used for the
|
||||
proxy */
|
||||
data->req.ignorebody = FALSE;
|
||||
|
@ -751,15 +751,6 @@ static void conn_shutdown(struct Curl_easy *data, struct connectdata *conn)
|
||||
DEBUGASSERT(data);
|
||||
infof(data, "Closing connection %ld", conn->connection_id);
|
||||
|
||||
#ifndef USE_HYPER
|
||||
if(conn->connect_state && conn->connect_state->prot_save) {
|
||||
/* If this was closed with a CONNECT in progress, cleanup this temporary
|
||||
struct arrangement */
|
||||
data->req.p.http = NULL;
|
||||
Curl_safefree(conn->connect_state->prot_save);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* possible left-overs from the async name resolvers */
|
||||
Curl_resolver_cancel(data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user