diff options
author | Nicolas Williams <nico@cryptonector.com> | 2015-04-19 14:39:10 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2015-04-19 14:39:10 -0500 |
commit | e8563aeae5da26828d68a9972cdec4af63f12d45 (patch) | |
tree | bfc9c0aba79a01b627d84aa688fcc7df14c3adcd | |
parent | 41524590bef66d5db39fa50bd25a3f7070b96e0b (diff) |
coverity 1164093
-rw-r--r-- | lib/krb5/crypto-rand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/krb5/crypto-rand.c b/lib/krb5/crypto-rand.c index 9ae550b06..67b9f7fed 100644 --- a/lib/krb5/crypto-rand.c +++ b/lib/krb5/crypto-rand.c @@ -122,8 +122,10 @@ krb5_generate_random(void *buf, size_t len) HEIMDAL_MUTEX_lock(&crypto_mutex); if (!rng_initialized) { - if (seed_something()) + if (seed_something()) { + HEIMDAL_MUTEX_unlock(&crypto_mutex); return HEIM_ERR_RANDOM_OFFLINE; + } rng_initialized = 1; } if (RAND_bytes(buf, len) <= 0) |