Pārlūkot izejas kodu

Never run crypto_early_init() more than once

Previously we had set up all the infrastructure to avoid calling it
after the first time, but didn't actually use it.
Roger Dingledine 10 gadi atpakaļ
vecāks
revīzija
c08b47977e
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      src/common/crypto.c

+ 3 - 0
src/common/crypto.c

@@ -282,6 +282,9 @@ int
 crypto_early_init(void)
 {
   if (!crypto_early_initialized_) {
+
+    crypto_early_initialized_ = 1;
+
     ERR_load_crypto_strings();
     OpenSSL_add_all_algorithms();