projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Ensure the thread keys are always allocated in the same order
[openssl.git]
/
crypto
/
engine
/
eng_lib.c
diff --git
a/crypto/engine/eng_lib.c
b/crypto/engine/eng_lib.c
index f5031d3eb7054de2966bc00d3592a3668c2c0977..95736eda6a0de25f0d1822813db84a29b99bd957 100644
(file)
--- a/
crypto/engine/eng_lib.c
+++ b/
crypto/engine/eng_lib.c
@@
-20,7
+20,8
@@
CRYPTO_ONCE engine_lock_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE(do_engine_lock_init)
{
- OPENSSL_init_crypto(0, NULL);
+ if (!OPENSSL_init_crypto(0, NULL))
+ return 0;
global_engine_lock = CRYPTO_THREAD_lock_new();
return global_engine_lock != NULL;
}