Fix a memory leak in ssl_create_cipher_list

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16954)
This commit is contained in:
Bernd Edlinger 2021-11-03 09:19:39 +01:00
parent b3c34401c0
commit 3a069c1b0b

View 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;
}