]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a memory leak in ssl_create_cipher_list
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 3 Nov 2021 08:19:39 +0000 (09:19 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 4 Nov 2021 15:54:34 +0000 (16:54 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16954)

ssl/ssl_ciph.c

index b2a5fb077ea82f32d0982c46b63ae2804a903ac8..c396f69c3a76ca75c06b8fe7e2badfd0c8802d9a 100644 (file)
@@ -1643,6 +1643,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_CTX *ctx,
         }
 
         if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
+            OPENSSL_free(co_list);
             sk_SSL_CIPHER_free(cipherstack);
             return NULL;
         }