lbutils: close fd on rset failure

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-25 20:54:24 +00:00
parent e8c4bccd86
commit ee4f765719
+4
View File
@@ -128,6 +128,10 @@ out:
errno = saved_errno;
return;
err:
#if defined(USE_URANDOM) && \
((USE_URANDOM) > 0)
close_no_err(&fd);
#endif
err_no_cleanup(0, ECANCELED,
"Randomisation failure, possibly unsupported in your kernel");
exit(EXIT_FAILURE);