From 5c7c55dfe84c0835d79fe63e46e297f2a5797a68 Mon Sep 17 00:00:00 2001 From: wifiextender Date: Fri, 5 Aug 2016 23:20:27 +0200 Subject: [PATCH] Stay cheesy --- src/functions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/functions.c b/src/functions.c index c232277..de5e45e 100644 --- a/src/functions.c +++ b/src/functions.c @@ -146,11 +146,13 @@ get_cores_load(char *str1, char *str2) { } if (NULL == fgets(buf, VLA, fp)) { + fclose(fp); exit_with_err(ERR, "reached /proc/stat EOF"); } for (x = 0; x < MAX_CORES; x++) { if (NULL == fgets(buf, VLA, fp)) { + fclose(fp); exit_with_err(ERR, "reached /proc/stat EOF"); } -- 2.11.0