From 15b06d6100ceed0974d52d1aeffa67e9e34fc7da Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Mar 2014 14:01:19 +0000 Subject: [PATCH] make-fs: Close FILE* along error path. Found by Coverity. --- make-fs/make-fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c index f931d2198..a03bb8fac 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -419,6 +419,7 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn) } if (fgets (line, sizeof line, fp) == NULL) { perror ("fgets"); + fclose (fp); return -1; } fclose (fp);