From: Jouni Malinen Date: Thu, 26 May 2022 11:01:28 +0000 (+0300) Subject: OpenSSL: Free OSSL_DECODER_CTX in tls_global_dh() X-Git-Tag: hostap_2_11~1880 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d19dccf946ddbe886a5fd1ab7bfab9f01e5243b;p=thirdparty%2Fhostap.git OpenSSL: Free OSSL_DECODER_CTX in tls_global_dh() The conversion to the new OpenSSL 3.0 API had forgotten to free the context structure. Fixes: bcd299b326d8 ("OpenSSL: Convert DH/DSA parameter loading to new API") Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 78621d926..98787a3de 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -4151,8 +4151,10 @@ static int tls_global_dh(struct tls_data *data, const char *dh_file) "TLS: Failed to decode domain parameters from '%s': %s", dh_file, ERR_error_string(ERR_get_error(), NULL)); BIO_free(bio); + OSSL_DECODER_CTX_free(ctx); return -1; } + OSSL_DECODER_CTX_free(ctx); BIO_free(bio); if (!tmpkey) {