summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2011-09-05 10:25:15 +0000
committerBodo Möller <bodo@openssl.org>2011-09-05 10:25:15 +0000
commitdb45308477e19f82fe5824366b55d108620e7804 (patch)
treec077b46123a38c17783330fe00edf80c7084e358 /ssl/s3_lib.c
parent1c7c69a8a5735aeb9c8b3d732b5bee090e3b8604 (diff)
(EC)DH memory handling fixes.
Submitted by: Adam Langley
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 8fa4ab02c3..e6091ef816 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -1722,11 +1722,17 @@ void ssl3_clear(SSL *s)
}
#ifndef OPENSSL_NO_DH
if (s->s3->tmp.dh != NULL)
+ {
DH_free(s->s3->tmp.dh);
+ s->s3->tmp.dh = NULL;
+ }
#endif
#ifndef OPENSSL_NO_ECDH
if (s->s3->tmp.ecdh != NULL)
+ {
EC_KEY_free(s->s3->tmp.ecdh);
+ s->s3->tmp.ecdh = NULL;
+ }
#endif
rp = s->s3->rbuf.buf;