Kaynağa Gözat

* Properly cleanup ssl_ctx if unable to seed the PRNG

Bryan Drewery 15 yıl önce
ebeveyn
işleme
f74104e1a9
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      src/libssl.c

+ 2 - 0
src/libssl.c

@@ -106,6 +106,8 @@ int load_ssl() {
 
   if (seed_PRNG()) {
     sdprintf("Wasn't able to properly seed the PRNG!");
+    SSL_CTX_free(ssl_ctx);
+    ssl_ctx = NULL;
     return 1;
   }
 #endif