mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Fix resource leak
This commit is contained in:
parent
10b22e3141
commit
a8ae0b252a
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue