From 80e52bb852673cf6f1908549ff9960d02a644d51 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Wed, 3 Nov 2021 09:19:39 +0100 Subject: Fix a memory leak in ssl_create_cipher_list Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/16955) --- ssl/ssl_ciph.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ssl/ssl_ciph.c') diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 735a483c64..0820f2cd0c 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1601,6 +1601,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) { if (!sk_SSL_CIPHER_push(cipherstack, sk_SSL_CIPHER_value(tls13_ciphersuites, i))) { + OPENSSL_free(co_list); sk_SSL_CIPHER_free(cipherstack); return NULL; } -- cgit v1.2.3