2
0
mirror of https://github.com/curl/curl.git synced 2025-04-24 16:40:32 +08:00

openssl: when creating a new context, there cannot be an old one

Remove the previous handling that would call SSL_CTX_free(), and instead
add an assert that halts a debug build if there ever is a context
already set at this point.

Closes 
This commit is contained in:
Daniel Stenberg 2021-08-17 16:52:55 +02:00
parent f121b01593
commit 0da1356060
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

@ -2658,8 +2658,7 @@ static CURLcode ossl_connect_step1(struct Curl_easy *data,
return CURLE_SSL_CONNECT_ERROR;
}
if(backend->ctx)
SSL_CTX_free(backend->ctx);
DEBUGASSERT(!backend->ctx);
backend->ctx = SSL_CTX_new(req_method);
if(!backend->ctx) {