mirror of
https://github.com/curl/curl.git
synced 2026-07-23 22:47:23 +03:00
openssl: first unload the provider, then free the context
Doing it in the reversed order causes bad problems inside OpenSSL. Closes #17223
This commit is contained in:
parent
cf1b709dff
commit
2fa3d528ae
1 changed files with 3 additions and 3 deletions
|
|
@ -1947,9 +1947,6 @@ static struct curl_slist *ossl_engines_list(struct Curl_easy *data)
|
|||
|
||||
static void ossl_provider_cleanup(struct Curl_easy *data)
|
||||
{
|
||||
OSSL_LIB_CTX_free(data->state.libctx);
|
||||
data->state.libctx = NULL;
|
||||
Curl_safefree(data->state.propq);
|
||||
if(data->state.baseprov) {
|
||||
OSSL_PROVIDER_unload(data->state.baseprov);
|
||||
data->state.baseprov = NULL;
|
||||
|
|
@ -1958,6 +1955,9 @@ static void ossl_provider_cleanup(struct Curl_easy *data)
|
|||
OSSL_PROVIDER_unload(data->state.provider);
|
||||
data->state.provider = NULL;
|
||||
}
|
||||
OSSL_LIB_CTX_free(data->state.libctx);
|
||||
data->state.libctx = NULL;
|
||||
Curl_safefree(data->state.propq);
|
||||
data->state.provider_loaded = FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue