diff options
Diffstat (limited to 'src/random.cpp')
-rw-r--r-- | src/random.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/random.cpp b/src/random.cpp index 67efc7d945..6c39d98c56 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -191,6 +191,7 @@ void GetDevURandom(unsigned char *ent32) do { ssize_t n = read(f, ent32 + have, NUM_OS_RANDOM_BYTES - have); if (n <= 0 || n + have > NUM_OS_RANDOM_BYTES) { + close(f); RandFailure(); } have += n; |