diff options
author | Bodo Möller <bodo@openssl.org> | 2011-09-05 10:25:27 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2011-09-05 10:25:27 +0000 |
commit | 61ac68f9f65e4dafb2ef5407a2d4c587d9c9f74d (patch) | |
tree | 2e9412abd7c84df0e21db86ed05a3ecdf9166791 /ssl/s3_lib.c | |
parent | 7f1022a8b13499879b3928763787423949cf4911 (diff) |
(EC)DH memory handling fixes.
Submitted by: Adam Langley
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 9b4d060c5f..c82dcc744c 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3021,11 +3021,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; |