library: Close filehandle for procps_loadavg

Previous commit didn't close the filehandle after making the
open non-persistent.

References:
 commit 8fcd14de18
This commit is contained in:
Craig Small 2022-06-02 16:36:40 +10:00
parent ce0286daca
commit f8f3ea2527

View File

@ -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);