Free pha_dgst in SSL_clear()
authorTodd Short <tshort@akamai.com>
Wed, 31 Jan 2018 21:20:52 +0000 (16:20 -0500)
committerMatt Caswell <matt@openssl.org>
Thu, 1 Feb 2018 17:07:56 +0000 (17:07 +0000)
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4964)

ssl/ssl_lib.c

index 5a5fbad1f6078ec8ecfef8caf9897855d65dc720..68a9b190876a3a015d71dfc4456acc0cb8858d61 100644 (file)
@@ -614,6 +614,9 @@ int SSL_clear(SSL *s)
 
     s->key_update = SSL_KEY_UPDATE_NONE;
 
+    EVP_MD_CTX_free(s->pha_dgst);
+    s->pha_dgst = NULL;
+
     /* Reset DANE verification result state */
     s->dane.mdpth = -1;
     s->dane.pdpth = -1;