mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-03 21:19:39 +00:00
Make the lock in CRYPTO_secure_allocated() a read lock
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14775)
This commit is contained in:
parent
bec9289143
commit
0bc27f7203
@ -212,7 +212,7 @@ int CRYPTO_secure_allocated(const void *ptr)
|
||||
|
||||
if (!secure_mem_initialized)
|
||||
return 0;
|
||||
if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
|
||||
if (!CRYPTO_THREAD_read_lock(sec_malloc_lock))
|
||||
return 0;
|
||||
ret = sh_allocated(ptr);
|
||||
CRYPTO_THREAD_unlock(sec_malloc_lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user