there is no operations within critical section that would
require write lock.
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28014)
#ifndef OPENSSL_NO_SECURE_MEMORY
size_t actual_size;
- if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
+ if (!CRYPTO_THREAD_read_lock(sec_malloc_lock))
return 0;
actual_size = sh_actual_size(ptr);
CRYPTO_THREAD_unlock(sec_malloc_lock);