From: Vincent Brillault Date: Sat, 23 Aug 2014 23:39:37 +0000 (+0200) Subject: Turbostat: add a missing fclose X-Git-Tag: collectd-5.5.0~24^2~49 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=bbf4bc97dac321ad9347f2f343909fb8ecb2a447;p=collectd.git Turbostat: add a missing fclose --- 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; }