소스 검색

Set DH parameters to NULL on shutdown

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

Part of 24581.
Nick Mathewson 8 년 전
부모
커밋
06ffafcb9d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/common/crypto.c

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