mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
rng_test_helpers: add a needless lock/unlock pair to please coverity
Fix for CID 1444908
This commit is contained in:
parent
d86896b29c
commit
1bf451cffb
@ -183,11 +183,14 @@ void
|
||||
testing_enable_prefilled_rng(const void *buffer, size_t buflen)
|
||||
{
|
||||
tor_assert(buflen > 0);
|
||||
tor_assert(!rng_mutex);
|
||||
rng_mutex = tor_mutex_new();
|
||||
|
||||
tor_mutex_acquire(rng_mutex);
|
||||
prefilled_rng_buffer = tor_memdup(buffer, buflen);
|
||||
prefilled_rng_buflen = buflen;
|
||||
prefilled_rng_idx = 0;
|
||||
tor_mutex_release(rng_mutex);
|
||||
|
||||
MOCK(crypto_rand, crypto_rand_prefilled);
|
||||
MOCK(crypto_strongest_rand_, mock_crypto_strongest_rand);
|
||||
|
Loading…
Reference in New Issue
Block a user