commit 06ffafcb9d4107297b6e72ee53d6e6db782cbdea
parent 474ca13d6a5e8aa2cf099e92e68eb932b15b2315
Author: Nick Mathewson <nickm@torproject.org>
Date: Mon, 11 Dec 2017 11:37:54 -0500
Set DH parameters to NULL on shutdown
If we don't do this, we will use freed memory on restart.
Part of 24581.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/common/crypto.c b/src/common/crypto.c
@@ -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