summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 2971eab4..c47447f9 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -728,7 +728,8 @@ open_dev_urandom(void)
errno = 0;
rname = oldrandom;
- if (open(rname, O_RDONLY | O_BINARY | O_NONBLOCK) == -1)
+ urandom_fd = open(rname, O_RDONLY | O_BINARY | O_NONBLOCK);
+ if (urandom_fd == -1)
err(errno, "%s: could not open", rname);
}