util/nvmutil: explicitly reset file descriptors

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-09 17:53:56 +00:00
parent b69863e51f
commit 61968ec2b9

View File

@@ -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
}