Browse Source

Fix resource leak

0.15
Dag Robole 7 years ago
parent
commit
a8ae0b252a
  1. 1
      src/random.cpp

1
src/random.cpp

@ -191,6 +191,7 @@ void GetDevURandom(unsigned char *ent32) @@ -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;

Loading…
Cancel
Save