We were taking a read lock. It should have been a write lock.
Fixes #19474
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19481)
if (!freeing) {
int acc;
- if (!CRYPTO_THREAD_read_lock(prov->opbits_lock))
+ if (!CRYPTO_THREAD_write_lock(prov->opbits_lock))
return 0;
OPENSSL_free(prov->operation_bits);
prov->operation_bits = NULL;