diff --git a/providers/implementations/rands/drbg.c b/providers/implementations/rands/drbg.c index 8b899b99b17dc..16d382dced8f5 100644 --- a/providers/implementations/rands/drbg.c +++ b/providers/implementations/rands/drbg.c @@ -837,6 +837,10 @@ PROV_DRBG *ossl_rand_drbg_new goto err; } } +#ifdef TSAN_REQUIRES_LOCKING + if (!ossl_drbg_enable_locking(drbg)) + goto err; +#endif return drbg; err: