mirror of
https://github.com/curl/curl.git
synced 2026-08-01 21:40:32 +03:00
vtsl: eliminate 'data->state.ssl_scache'
Keeping the relevant 'ssl_scache' in 'data->state' leads to problems when the owner of the cache is cleaned up and this reference is left dangling. Remove the ref entirely and always find the ssl_scache at the current share or multi. Folded in #16260 (test 3208) to verify this fixes the bug with a dangling reference when an easy handle is used with easy_perform first and in a multi_perform after. Ref: #16236 Closes #16261
This commit is contained in:
parent
f1939fa60d
commit
242a1439e7
8 changed files with 193 additions and 59 deletions
|
|
@ -1584,10 +1584,6 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
|
|||
if(data->share->hsts == data->hsts)
|
||||
data->hsts = NULL;
|
||||
#endif
|
||||
#ifdef USE_SSL
|
||||
if(data->share->ssl_scache == data->state.ssl_scache)
|
||||
data->state.ssl_scache = data->multi ? data->multi->ssl_scache : NULL;
|
||||
#endif
|
||||
#ifdef USE_LIBPSL
|
||||
if(data->psl == &data->share->psl)
|
||||
data->psl = data->multi ? &data->multi->psl : NULL;
|
||||
|
|
@ -1628,10 +1624,6 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
|
|||
data->hsts = data->share->hsts;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_SSL
|
||||
if(data->share->ssl_scache)
|
||||
data->state.ssl_scache = data->share->ssl_scache;
|
||||
#endif
|
||||
#ifdef USE_LIBPSL
|
||||
if(data->share->specifier & (1 << CURL_LOCK_DATA_PSL))
|
||||
data->psl = &data->share->psl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue