mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
util/nvmutil: explicitly reset file descriptors
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1321,12 +1321,14 @@ close_files(void)
|
||||
if (gbe_fd > -1) {
|
||||
if (close(gbe_fd) == -1)
|
||||
err(-1, "%s: close failed", fname);
|
||||
gbe_fd = -1;
|
||||
}
|
||||
|
||||
#ifndef NVMUTIL_ARC4RANDOM_BUF
|
||||
if (urandom_fd > -1) {
|
||||
if (close(urandom_fd) == -1)
|
||||
err(-1, "%s: close failed", rname);
|
||||
urandom_fd = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user