projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
971a882
)
turbostat plugin: close fd on error
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 4 Dec 2015 22:08:46 +0000
(23:08 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 07:53:43 +0000
(08:53 +0100)
Signed-off-by: Florian Forster <octo@collectd.org>
src/turbostat.c
patch
|
blob
|
history
diff --git
a/src/turbostat.c
b/src/turbostat.c
index
42fed52
..
5ab073d
100644
(file)
--- a/
src/turbostat.c
+++ b/
src/turbostat.c
@@
-1037,6
+1037,7
@@
parse_int_file(const char *fmt, ...)
}
if (fscanf(filep, "%d", &value) != 1) {
ERROR("turbostat plugin: Failed to parse number from '%s'", path);
+ fclose(filep);
return -1;
}
fclose(filep);