diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-08 03:22:50 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-08 03:22:50 +0000 |
| commit | ec3ab4059cd3e2d4e74e3d23f91a942f5e3a9767 (patch) | |
| tree | c46d86012dfd44eefb18eb1380a038002ebc2533 /util/nvmutil | |
| parent | 63fcc0891f2a2cef9a5c92b1ac17afce9fe53ad5 (diff) | |
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 9191f2ea..c6193d9e 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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 /* |
