diff options
author | Emeric Brun <ebrun@haproxy.com> | 2017-07-26 15:59:21 +0200 |
---|---|---|
committer | Benjamin Kaduk <kaduk@mit.edu> | 2017-07-26 12:03:17 -0500 |
commit | a4110310ea6879622516294b9fc7ef6e2f815c1c (patch) | |
tree | a8cf47f14d8a07a0cebafbddff2c5d3dd4e2ec79 /crypto/rand | |
parent | eea5f335b81d89554272a1fab8de9e40656509da (diff) |
Fix async engine pause dead lock in error case.
In 'crypto/rand/ossl_rand.c', a call to
'ASYNC_unblock_pause()' is missing in an error case.
CLA: trivial
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(cherry picked from commit e4b16013e9b3d19241d3ba0bb0875f0d70d93509)
(Merged from https://github.com/openssl/openssl/pull/4024)
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/md_rand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 85ce4e6f98..fee722abf7 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -492,6 +492,7 @@ static int rand_bytes(unsigned char *buf, int num, int pseudo) */ ASYNC_block_pause(); if (!MD_Update(m, md, MD_DIGEST_LENGTH) || !MD_Final(m, md)) { + ASYNC_unblock_pause(); CRYPTO_THREAD_unlock(rand_lock); goto err; } |