summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-11-22 15:14:59 +0100
committerNick Mathewson <nickm@torproject.org>2011-11-30 13:17:47 -0500
commit02708b7d8077801c44c944687d8c9f90321a4655 (patch)
treead7f6dabafa8c59600510f9ddf6d603cb2a75a1b /src/common/crypto.c
parenta708e85236d17abaf16da4c455af8a776ad2f7b9 (diff)
downloadtor-02708b7d8077801c44c944687d8c9f90321a4655.tar.gz
tor-02708b7d8077801c44c944687d8c9f90321a4655.zip
Free the global DH parameters in crypto_global_cleanup().
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index a9d8b04e60..62b0bcec6c 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -3069,6 +3069,13 @@ crypto_global_cleanup(void)
ERR_remove_state(0);
ERR_free_strings();
+ if (dh_param_p)
+ BN_free(dh_param_p);
+ if (dh_param_p_tls)
+ BN_free(dh_param_p_tls);
+ if (dh_param_g)
+ BN_free(dh_param_g);
+
#ifndef DISABLE_ENGINES
ENGINE_cleanup();
#endif