summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorx2018 <xkernel.wang@foxmail.com>2021-10-27 17:26:48 +0800
committerMatt Caswell <matt@openssl.org>2021-11-16 16:02:16 +0000
commit4204cd6429b8d25e2d96b38b264ef7fa1b67d7be (patch)
treea8478d61b94a4f39dd1b8c9504eb63c65899b858 /ssl
parentce287b72e49a2b064550508631d638124f85e693 (diff)
free the Post-Handshake Auth digest when there is an error saving the digest
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16924)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/statem_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c
index c3b6f8f456..c218992e46 100644
--- a/ssl/statem/statem_lib.c
+++ b/ssl/statem/statem_lib.c
@@ -2410,6 +2410,8 @@ int tls13_save_handshake_digest_for_pha(SSL *s)
SSLfatal(s, SSL_AD_INTERNAL_ERROR,
SSL_F_TLS13_SAVE_HANDSHAKE_DIGEST_FOR_PHA,
ERR_R_INTERNAL_ERROR);
+ EVP_MD_CTX_free(s->pha_dgst);
+ s->pha_dgst = NULL;
return 0;
}
}