diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-11-03 09:40:59 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-11-04 16:50:42 +0100 |
commit | bdaf55d0850056fcf3362e5dc1c868f2c8324f25 (patch) | |
tree | 0db709862a7ac634a09f8a5ad5a2338cc9f077d7 /ssl | |
parent | afbea17ded816aba6d7106671b405de82da5c6f3 (diff) |
Fix a memory leak in tls_parse_stoc_key_share
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16957)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/statem/extensions_clnt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/statem/extensions_clnt.c b/ssl/statem/extensions_clnt.c index ce8a75794c..621fcfa561 100644 --- a/ssl/statem/extensions_clnt.c +++ b/ssl/statem/extensions_clnt.c @@ -1872,6 +1872,7 @@ int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x, if (skey == NULL || EVP_PKEY_copy_parameters(skey, ckey) <= 0) { SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PARSE_STOC_KEY_SHARE, ERR_R_MALLOC_FAILURE); + EVP_PKEY_free(skey); return 0; } if (!EVP_PKEY_set1_tls_encodedpoint(skey, PACKET_data(&encoded_pt), |