Add missing RAND initialisation call.
authorPauli <paul.dale@oracle.com>
Wed, 7 Nov 2018 21:22:01 +0000 (07:22 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 7 Nov 2018 21:22:01 +0000 (07:22 +1000)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/7587)

crypto/rand/rand_lib.c

index 4f1a1349004fdc3d65fef64552301a7d575bbaa0..277403ca12291916ec4d0cc9375249096560d7cc 100644 (file)
@@ -363,7 +363,8 @@ void rand_cleanup_int(void)
  */
 void RAND_keep_random_devices_open(int keep)
 {
-    rand_pool_keep_random_devices_open(keep);
+    if (RUN_ONCE(&rand_init, do_rand_init))
+        rand_pool_keep_random_devices_open(keep);
 }
 
 /*