projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't cleanup uninitialized thread local slots
[openssl.git]
/
crypto
/
rand
/
drbg_lib.c
diff --git
a/crypto/rand/drbg_lib.c
b/crypto/rand/drbg_lib.c
index c6397b22c6d4e94bcbd88556699326168ab23776..60ddd2fe204b409a940663be9ca746fd9df8c9c7 100644
(file)
--- 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)
{
/* 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()
}
void drbg_delete_thread_state()