summaryrefslogtreecommitdiff
path: root/util/libreboot-utils
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-31 14:14:44 +0100
committerLeah Rowe <leah@libreboot.org>2026-03-31 14:14:44 +0100
commitc0fd88155a83a0e080eaa769d5035a3c36d6d0fe (patch)
treec72f0a85c495861558b7f74f59c1df70329160ad /util/libreboot-utils
parent6d9f162f5b649c68e95a534a06339a83ddfe621c (diff)
lbutils/rand: add missing error handle
accidentally removed in previous refactor Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils')
-rw-r--r--util/libreboot-utils/lib/rand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c
index 7634903a..20dc33cd 100644
--- a/util/libreboot-utils/lib/rand.c
+++ b/util/libreboot-utils/lib/rand.c
@@ -165,6 +165,9 @@ retry_rand:
#error Unsupported operating system (possibly unsecure randomisation)
#endif
+ if (rc < 0)
+ goto err;
+
if (rc == 0)
goto err; /* prevent infinite loop on fatal err */