[openssl-commits] [openssl] master update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Sun Apr 29 08:25:21 UTC 2018


The branch master has been updated
       via  bf7ae7500073f85fed8a82c4f8ec981d44a8c3d6 (commit)
      from  272c0df8e1aa549da9060bf70b34c9aabb3bcb0d (commit)


- Log -----------------------------------------------------------------
commit bf7ae7500073f85fed8a82c4f8ec981d44a8c3d6
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Sat Apr 28 19:09:55 2018 +0200

    Don't cleanup uninitialized thread local slots
    
    Fixes: #6120
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6123)

-----------------------------------------------------------------------

Summary of changes:
 crypto/rand/drbg_lib.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index c6397b2..60ddd2f 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -912,11 +912,13 @@ err1:
 /* Clean up the global DRBGs before exit */
 void rand_drbg_cleanup_int(void)
 {
-    RAND_DRBG_free(master_drbg);
-    master_drbg = NULL;
+    if (master_drbg != NULL) {
+        RAND_DRBG_free(master_drbg);
+        master_drbg = NULL;
 
-    CRYPTO_THREAD_cleanup_local(&private_drbg);
-    CRYPTO_THREAD_cleanup_local(&public_drbg);
+        CRYPTO_THREAD_cleanup_local(&private_drbg);
+        CRYPTO_THREAD_cleanup_local(&public_drbg);
+    }
 }
 
 void drbg_delete_thread_state()


More information about the openssl-commits mailing list