mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 10:30:52 +00:00
Fix resource leak
Cherry-picked from: a8ae0b252a2007568e77f5aca1c7fa3ec5941b72
This commit is contained in:
parent
60bd389823
commit
90d1972d81
@ -187,6 +187,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…
x
Reference in New Issue
Block a user