X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ffhcount.c;h=666dacc09db1b6e876cf5b11e769c37f97f05626;hb=a8c59c6d75efe3656b2f019ddefb2ce6cb2cbb2e;hp=4c409b58d894f20ed8544a2df964b379ced000ed;hpb=9ad5eefaa9dcc557c9117f8692cec1792f7ac7f0;p=collectd.git diff --git a/src/fhcount.c b/src/fhcount.c index 4c409b58..666dacc0 100644 --- a/src/fhcount.c +++ b/src/fhcount.c @@ -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);