aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/core/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/core/utils.c b/src/lib/core/utils.c
index 1fe9d1f..21f2297 100644
--- a/src/lib/core/utils.c
+++ b/src/lib/core/utils.c
@@ -1172,6 +1172,7 @@ int get_random_bytes(char *result, size_t maxlen) {
}
if (fp && ferror(fp)) {
SYSERROR("%s", "unable to read from random generator");
+ fclose(fp);
return -1;
}
if (isalnum(ch)) {