From: irosay <59870261+irosay@users.noreply.github.com> Date: Fri, 10 May 2024 16:37:52 +0000 (+0100) Subject: Release pkey_ctx on initialization failure X-Git-Tag: openssl-3.3.1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7cbc2dadacf8f76779a1fc5af37a2e01f0dd7ed;p=thirdparty%2Fopenssl.git Release pkey_ctx on initialization failure CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24366) (cherry picked from commit 3e9d933882407a0792dc3466ba9a0d53d40677a7) --- diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index 1c38548fe04..5ff479a2ec1 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -3230,7 +3230,7 @@ static int tls_process_cke_gost(SSL_CONNECTION *s, PACKET *pkt) } if (EVP_PKEY_decrypt_init(pkey_ctx) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); - return 0; + goto err; } /* * If client certificate is present and is of the same type, maybe