diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-12-09 11:53:54 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-12-09 15:30:09 +0100 |
commit | ee263de7a378e701f15e58879f36fdcfe8742006 (patch) | |
tree | 5fdf1aafe027c7e659cfaa989f429b5159645a79 /lib/http2.c | |
parent | 9e891ff54de34d0e4c9aec502eb53e5b64a6dd1f (diff) | |
download | curl-ee263de7a378e701f15e58879f36fdcfe8742006.tar.gz |
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
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c index b741aed48..65f3513ee 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -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 */ |