[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Mon Jun 12 19:29:02 UTC 2017
The branch master has been updated
via 71d8c138cf0a72663cd401d753564eecd8c23289 (commit)
from 5816586ba45bba05f6d9f0432a408063a42e1012 (commit)
- Log -----------------------------------------------------------------
commit 71d8c138cf0a72663cd401d753564eecd8c23289
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Mon Jun 12 19:30:10 2017 +0200
Fix a memleak in tls13_generate_secret.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3660)
-----------------------------------------------------------------------
Summary of changes:
ssl/tls13_enc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index 2763475..bc1995e 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -148,6 +148,7 @@ int tls13_generate_secret(SSL *s, const EVP_MD *md,
|| EVP_DigestInit_ex(mctx, md, NULL) <= 0
|| EVP_DigestFinal_ex(mctx, hash, NULL) <= 0) {
EVP_MD_CTX_free(mctx);
+ EVP_PKEY_CTX_free(pctx);
return 0;
}
EVP_MD_CTX_free(mctx);
@@ -156,8 +157,10 @@ int tls13_generate_secret(SSL *s, const EVP_MD *md,
if (!tls13_hkdf_expand(s, md, prevsecret,
(unsigned char *)derived_secret_label,
sizeof(derived_secret_label) - 1, hash,
- preextractsec, mdlen))
+ preextractsec, mdlen)) {
+ EVP_PKEY_CTX_free(pctx);
return 0;
+ }
prevsecret = preextractsec;
prevsecretlen = mdlen;
More information about the openssl-commits
mailing list