mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
mkimage: Close the file when unable to get its size
There is a missing close() on the error path. Add it. Reported-by: Coverity (CID: 138496) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user