From f8f3ea25274712d594c3097381d53c22f732df67 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Thu, 2 Jun 2022 16:36:40 +1000 Subject: [PATCH] library: Close filehandle for procps_loadavg Previous commit didn't close the filehandle after making the open non-persistent. References: commit 8fcd14de18b998647ba47f5b35feb1d85e2d2f08 --- proc/sysinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/proc/sysinfo.c b/proc/sysinfo.c index 311696e6..5d23cc5c 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -103,6 +103,7 @@ PROCPS_EXPORT int procps_loadavg( if (fscanf(fp, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) retval = -ERANGE; + fclose(fp); uselocale(LC_GLOBAL_LOCALE); freelocale(tmplocale); SET_IF_DESIRED(av1, avg_1);