From 7aa05b4c4db5bca53f9ed957e4307235be844e9b Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 23 Apr 2026 12:10:29 -0400 Subject: Close handle on error --- src/lib/core/utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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)) { -- cgit