From: Bernd Edlinger Date: Wed, 3 Nov 2021 08:19:39 +0000 (+0100) Subject: Fix a memory leak in ssl_create_cipher_list X-Git-Tag: OpenSSL_1_1_1m~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80e52bb852673cf6f1908549ff9960d02a644d51;p=thirdparty%2Fopenssl.git 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) --- diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 735a483c644..0820f2cd0c7 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; }