mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
util/nvmutil: close random_fd only if used
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -267,8 +267,10 @@ main(int argc, char *argv[])
|
||||
if (close(gbe_fd) == -1)
|
||||
err(ECANCELED, "close '%s'", fname);
|
||||
#ifndef HAVE_ARC4RANDOM_BUF
|
||||
if (close(urandom_fd) == -1)
|
||||
err(ECANCELED, "close '%s'", rname);
|
||||
if (urandom_fd > -1) {
|
||||
if (close(urandom_fd) == -1)
|
||||
err(ECANCELED, "close '%s'", rname);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user