]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Free the global DH parameters in crypto_global_cleanup().
authorGeorge Kadianakis <desnacked@gmail.com>
Tue, 22 Nov 2011 14:14:59 +0000 (15:14 +0100)
committerNick Mathewson <nickm@torproject.org>
Wed, 30 Nov 2011 18:17:47 +0000 (13:17 -0500)
src/common/crypto.c

index a9d8b04e605fdd6cb14f9ca0e5b25a1e102e1c73..62b0bcec6c3b4653b9700d9a2b0d15d2b5376745 100644 (file)
@@ -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