From fd0e434087ee51d8bc7be6ea1287685d91dc4b1e Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 8 Dec 2014 18:38:31 +0100 Subject: Windows: correct lock issue in RandgetBytes by releasing critical section in case of error. --- src/Common/Random.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Common') 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; } -- cgit v1.2.3