[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Mon Jun 19 13:25:53 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 4b4bc00a00456e6d5cc8b2a26489ae905c049f41 (commit)
from 77b072504ec464eac5e0f9aab19cadb9c4e311d1 (commit)
- Log -----------------------------------------------------------------
commit 4b4bc00a00456e6d5cc8b2a26489ae905c049f41
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Mon Jun 19 13:33:41 2017 +0200
Fix the fall-out in 04-test_bioprint.t
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3712)
(cherry picked from commit 3ac6d5ee5372b05aa90cc5c44efbde01bd669e9e)
-----------------------------------------------------------------------
Summary of changes:
crypto/init.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/crypto/init.c b/crypto/init.c
index 647cfb6..3956967 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -43,7 +43,10 @@ static struct thread_local_inits_st *ossl_init_get_thread_local(int alloc)
if (local == NULL && alloc) {
local = OPENSSL_zalloc(sizeof *local);
- CRYPTO_THREAD_set_local(&threadstopkey, local);
+ if (local != NULL && !CRYPTO_THREAD_set_local(&threadstopkey, local)) {
+ OPENSSL_free(local);
+ return NULL;
+ }
}
if (!alloc) {
CRYPTO_THREAD_set_local(&threadstopkey, NULL);
@@ -356,7 +359,12 @@ void OPENSSL_thread_stop(void)
int ossl_init_thread_start(uint64_t opts)
{
- struct thread_local_inits_st *locals = ossl_init_get_thread_local(1);
+ struct thread_local_inits_st *locals;
+
+ if (!OPENSSL_init_crypto(0, NULL))
+ return 0;
+
+ locals = ossl_init_get_thread_local(1);
if (locals == NULL)
return 0;
More information about the openssl-commits
mailing list