mirror of
https://github.com/curl/curl.git
synced 2026-07-30 11:58:53 +03:00
conncache: fix multi-thread use of shared connection cache
It could accidentally let the connection get used by more than one thread, leading to double-free and more. Reported-by: Christopher Reid Fixes #4544 Closes #4557
This commit is contained in:
parent
9e891ff54d
commit
ee263de7a3
8 changed files with 58 additions and 52 deletions
|
|
@ -1169,11 +1169,10 @@ static void populate_settings(struct connectdata *conn,
|
|||
httpc->local_settings_num = 3;
|
||||
}
|
||||
|
||||
void Curl_http2_done(struct connectdata *conn, bool premature)
|
||||
void Curl_http2_done(struct Curl_easy *data, bool premature)
|
||||
{
|
||||
struct Curl_easy *data = conn->data;
|
||||
struct HTTP *http = data->req.protop;
|
||||
struct http_conn *httpc = &conn->proto.httpc;
|
||||
struct http_conn *httpc = &data->conn->proto.httpc;
|
||||
|
||||
/* there might be allocated resources done before this got the 'h2' pointer
|
||||
setup */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue