mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-29 00:31:02 +00:00
Add finalize_rand() to prove we have no leaks
This commit is contained in:
parent
661751ab4b
commit
ce67a85d39
6
rand.c
6
rand.c
@ -33,10 +33,12 @@ void init_rand(void)
|
||||
f = fopen("/dev/urandom", "r");
|
||||
}
|
||||
|
||||
void finalize_rand(void)
|
||||
int finalize_rand(void)
|
||||
{
|
||||
fclose(f);
|
||||
int err = fclose(f);
|
||||
f = NULL;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
uint32_t random32(void)
|
||||
|
Loading…
Reference in New Issue
Block a user