diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-12-08 18:38:31 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-12-11 18:31:29 +0100 |
commit | fd0e434087ee51d8bc7be6ea1287685d91dc4b1e (patch) | |
tree | 7229a153be21dc2f388d317de7dd8c2820f6e516 | |
parent | 84a279a83ff32eb31203a6c876ff26d009da4dec (diff) | |
download | VeraCrypt-fd0e434087ee51d8bc7be6ea1287685d91dc4b1e.tar.gz VeraCrypt-fd0e434087ee51d8bc7be6ea1287685d91dc4b1e.zip |
Windows: correct lock issue in RandgetBytes by releasing critical section in case of error.
-rw-r--r-- | src/Common/Random.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Common/Random.c b/src/Common/Random.c index 54192cb2..76ff6b61 100644 --- a/src/Common/Random.c +++ b/src/Common/Random.c @@ -363,6 +363,7 @@ BOOL RandgetBytes (unsigned char *buf, int len, BOOL forceSlowPoll) {
Error ("ERR_NOT_ENOUGH_RANDOM_DATA");
len = RNG_POOL_SIZE;
+ LeaveCriticalSection (&critRandProt);
return FALSE;
}
|