1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Windows: correct lock issue in RandgetBytes by releasing critical section in case of error.

This commit is contained in:
Mounir IDRASSI
2014-12-08 18:38:31 +01:00
parent 84a279a83f
commit fd0e434087

View File

@@ -363,6 +363,7 @@ BOOL RandgetBytes (unsigned char *buf, int len, BOOL forceSlowPoll)
{ {
Error ("ERR_NOT_ENOUGH_RANDOM_DATA"); Error ("ERR_NOT_ENOUGH_RANDOM_DATA");
len = RNG_POOL_SIZE; len = RNG_POOL_SIZE;
LeaveCriticalSection (&critRandProt);
return FALSE; return FALSE;
} }