summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ssl/ssl_ciph.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 0b6f01ccc1..80014a31fd 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1384,8 +1384,10 @@ static int update_cipher_list(STACK_OF(SSL_CIPHER) **cipher_list,
sk_SSL_CIPHER_insert(tmp_cipher_list,
sk_SSL_CIPHER_value(tls13_ciphersuites, i), i);
- if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list))
+ if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) {
+ sk_SSL_CIPHER_free(tmp_cipher_list);
return 0;
+ }
sk_SSL_CIPHER_free(*cipher_list);
*cipher_list = tmp_cipher_list;