mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
Merge pull request #15 from dllaurence/finalize_rand
Finalize all open file descriptors
This commit is contained in:
commit
d57d030362
8
rand.c
8
rand.c
@ -33,6 +33,14 @@ void init_rand(void)
|
||||
f = fopen("/dev/urandom", "r");
|
||||
}
|
||||
|
||||
int finalize_rand(void)
|
||||
{
|
||||
int err = fclose(f);
|
||||
f = NULL;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
uint32_t random32(void)
|
||||
{
|
||||
uint32_t r;
|
||||
|
Loading…
Reference in New Issue
Block a user