From bbf4bc97dac321ad9347f2f343909fb8ecb2a447 Mon Sep 17 00:00:00 2001 From: Vincent Brillault Date: Sun, 24 Aug 2014 01:39:37 +0200 Subject: [PATCH] Turbostat: add a missing fclose --- src/turbostat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/turbostat.c b/src/turbostat.c index bd2b2fe8..9369fb80 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -778,6 +778,7 @@ for_all_proc_cpus(int (func)(int)) retval = fscanf(fp, "cpu %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n"); if (retval != 0) { ERROR("Failed to parse /proc/stat"); + fclose(fp); return -ERR_CANT_READ_PROC_STAT; } -- 2.30.2