Set DH parameters to NULL on shutdown

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

Part of 24581.
This commit is contained in:
Nick Mathewson 2017-12-11 11:37:54 -05:00
parent 474ca13d6a
commit 06ffafcb9d

View File

@ -3470,6 +3470,8 @@ crypto_global_cleanup(void)
if (dh_param_g) if (dh_param_g)
BN_clear_free(dh_param_g); BN_clear_free(dh_param_g);
dh_param_p = dh_param_p_tls = dh_param_g = NULL;
#ifndef DISABLE_ENGINES #ifndef DISABLE_ENGINES
ENGINE_cleanup(); ENGINE_cleanup();
#endif #endif