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:
parent
ce0286daca
commit
f8f3ea2527
@ -103,6 +103,7 @@ PROCPS_EXPORT int procps_loadavg(
|
|||||||
if (fscanf(fp, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3)
|
if (fscanf(fp, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3)
|
||||||
retval = -ERANGE;
|
retval = -ERANGE;
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
uselocale(LC_GLOBAL_LOCALE);
|
uselocale(LC_GLOBAL_LOCALE);
|
||||||
freelocale(tmplocale);
|
freelocale(tmplocale);
|
||||||
SET_IF_DESIRED(av1, avg_1);
|
SET_IF_DESIRED(av1, avg_1);
|
||||||
|
Loading…
Reference in New Issue
Block a user