
16 Mar
2016
16 Mar
'16
2:45 p.m.
There is a missing close() on the error path. Add it.
Reported-by: Coverity (CID: 138496) Signed-off-by: Simon Glass sjg@chromium.org ---
tools/imagetool.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/imagetool.c b/tools/imagetool.c index 351211c..916ab96 100644 --- a/tools/imagetool.c +++ b/tools/imagetool.c @@ -107,6 +107,7 @@ int imagetool_get_filesize(struct image_tool_params *params, const char *fname) if (fstat(fd, &sbuf) < 0) { fprintf(stderr, "%s: Can't stat %s: %s\n", params->cmdname, fname, strerror(errno)); + close(fd); return -1; } close(fd);
--
2.7.0.rc3.207.g0ac5344