If we don't have entropy when krb5_c_random_make_octets is called,
unlock the mutex before returning an error. From
kevin.wasserman@painless-security.com.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25295
dc483132-0cff-0310-8789-
dd5450dbe970
if (ret)
return ret;
- if (!have_entropy)
+ if (!have_entropy) {
+ k5_mutex_unlock(&fortuna_lock);
return KRB5_CRYPTO_INTERNAL;
+ }
if (pid != last_pid) {
/* We forked; make sure child's PRNG stream differs from parent's. */