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-3.2.0-alpha1~3393 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a069c1b0b4857b838186aeb55378195dfa50823;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/16954) --- diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index b2a5fb077ea..c396f69c3a7 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -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; }