X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ffhcount.c;h=4b3abff7276502efca4c9697b788a2770561ce41;hb=3d74a63ae43c1786eb9b966e2209c24c5643dae8;hp=4c409b58d894f20ed8544a2df964b379ced000ed;hpb=09c6a320f3cb36b5dbb2c2ce43858f33be7acf9b;p=collectd.git diff --git a/src/fhcount.c b/src/fhcount.c index 4c409b58..4b3abff7 100644 --- a/src/fhcount.c +++ b/src/fhcount.c @@ -18,9 +18,9 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" -#include "configfile.h" static const char *config_keys[] = { @@ -98,6 +98,7 @@ static int fhcount_read(void) { } if (fgets(buffer, buffer_len, fp) == NULL) { ERROR("fhcount: fgets: %s", sstrerror(errno, errbuf, sizeof(errbuf))); + fclose(fp); return(EXIT_FAILURE); } fclose(fp);