mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +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 (gbe_fd > -1) {
|
||||||
if (close(gbe_fd) == -1)
|
if (close(gbe_fd) == -1)
|
||||||
err(-1, "%s: close failed", fname);
|
err(-1, "%s: close failed", fname);
|
||||||
|
gbe_fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NVMUTIL_ARC4RANDOM_BUF
|
#ifndef NVMUTIL_ARC4RANDOM_BUF
|
||||||
if (urandom_fd > -1) {
|
if (urandom_fd > -1) {
|
||||||
if (close(urandom_fd) == -1)
|
if (close(urandom_fd) == -1)
|
||||||
err(-1, "%s: close failed", rname);
|
err(-1, "%s: close failed", rname);
|
||||||
|
urandom_fd = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user