From 302d1697fe09a9f4e89980f4ea84f86e63fc5e8d Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 16 Mar 2018 16:45:55 +0100 Subject: [PATCH] Fix a memory leak in n_ssl3_mac Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/5648) --- ssl/record/ssl3_record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c index 5bfbaf982e..4ffc84279d 100644 --- a/ssl/record/ssl3_record.c +++ b/ssl/record/ssl3_record.c @@ -1256,7 +1256,7 @@ int n_ssl3_mac(SSL *ssl, SSL3_RECORD *rec, unsigned char *md, int sending) || EVP_DigestUpdate(md_ctx, ssl3_pad_2, npad) <= 0 || EVP_DigestUpdate(md_ctx, md, md_size) <= 0 || EVP_DigestFinal_ex(md_ctx, md, &md_size_u) <= 0) { - EVP_MD_CTX_reset(md_ctx); + EVP_MD_CTX_free(md_ctx); return 0; } -- 2.25.1