Commit 06ffafcb authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Set DH parameters to NULL on shutdown

If we don't do this, we will use freed memory on restart.

Part of 24581.
parent 474ca13d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3470,6 +3470,8 @@ crypto_global_cleanup(void)
  if (dh_param_g)
    BN_clear_free(dh_param_g);

  dh_param_p = dh_param_p_tls = dh_param_g = NULL;

#ifndef DISABLE_ENGINES
  ENGINE_cleanup();
#endif