http_proxy: restore the protocol pointer on error

Reported-by: Trail of Bits

Closes #9790
This commit is contained in:
Daniel Stenberg 2022-10-06 14:13:36 +02:00
parent 9d0869d234
commit 55e1875729
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 13 deletions

View file

@ -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);