Forráskód Böngészése

Free the global DH parameters in crypto_global_cleanup().

George Kadianakis 14 éve
szülő
commit
02708b7d80
1 módosított fájl, 7 hozzáadás és 0 törlés
  1. 7 0
      src/common/crypto.c

+ 7 - 0
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