X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ffhcount.c;h=c7603c7dc06ca519256eba9d190f54e24ad7f5e1;hb=727a4b977ec6549d94da3f694bf3fe8b0121db58;hp=4c409b58d894f20ed8544a2df964b379ced000ed;hpb=dab48f284f9d4bb6ae98244310c5cdb6c5d91bf3;p=collectd.git diff --git a/src/fhcount.c b/src/fhcount.c index 4c409b58..c7603c7d 100644 --- a/src/fhcount.c +++ b/src/fhcount.c @@ -18,6 +18,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" #include "configfile.h" @@ -98,6 +99,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);