]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Release pkey_ctx on initialization failure
authorirosay <59870261+irosay@users.noreply.github.com>
Fri, 10 May 2024 16:37:52 +0000 (17:37 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 14 May 2024 15:59:21 +0000 (17:59 +0200)
CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24366)

(cherry picked from commit 3e9d933882407a0792dc3466ba9a0d53d40677a7)

ssl/statem/statem_srvr.c

index 8e493176f658ef4d486e1d1568e55be34af584a5..2afadcf2313999f91e86b2bee261cee7a3b41307 100644 (file)
@@ -3134,7 +3134,7 @@ static int tls_process_cke_gost(SSL *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