diff options
author | Matt Caswell <matt@openssl.org> | 2018-08-27 14:52:09 +0100 |
---|---|---|
committer | Paul Yang <yang.yang@baishancloud.com> | 2018-08-30 09:50:29 +0800 |
commit | c2cb1a18e00fc0a9a44d9a83134e3d3b1bfb7454 (patch) | |
tree | 2d1a3287a53df5e501425220cd81bb34977af0a5 /ssl | |
parent | 307a494e5b01ff9f334a8242d31b8254c7c54baa (diff) |
Fix a mem leak on error in the PSK code
Thanks to @fangang190 for reporting this issue.
Fixes #7060
Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
(Merged from https://github.com/openssl/openssl/pull/7065)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 5ecbc3c554..7713f767b2 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -4621,6 +4621,7 @@ int ssl_generate_master_secret(SSL *s, unsigned char *pms, size_t pmslen, if (!s->method->ssl3_enc->generate_master_secret(s, s->session->master_key,pskpms, pskpmslen, &s->session->master_key_length)) { + OPENSSL_clear_free(pskpms, pskpmslen); /* SSLfatal() already called */ goto err; } |