mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-14 15:29:35 +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)
|
if (close(gbe_fd) == -1)
|
||||||
err(ECANCELED, "close '%s'", fname);
|
err(ECANCELED, "close '%s'", fname);
|
||||||
#ifndef HAVE_ARC4RANDOM_BUF
|
#ifndef HAVE_ARC4RANDOM_BUF
|
||||||
if (close(urandom_fd) == -1)
|
if (urandom_fd > -1) {
|
||||||
err(ECANCELED, "close '%s'", rname);
|
if (close(urandom_fd) == -1)
|
||||||
|
err(ECANCELED, "close '%s'", rname);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user