Skip to content
Snippets Groups Projects
Commit b12a81c4 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 4708a07c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment