Skip to content
Snippets Groups Projects
Commit eb1c716c authored by Mattias Hansson's avatar Mattias Hansson Committed by Stefano Babic
Browse files

tools/mxsimage: Remove fclose on empty FILE pointer


If `sb_load_cmdfile()` fails to open the configuration file it will jump
to error handling where the code will try to `fclose()` the FILE pointer
which is NULL causing `mkimage` to segfault.

This patch removes the label for error handling and instead returns
immediately which skips the `fclose()` and prevents the segfault. The
errno is also described in the error message to guide users.

Signed-off-by: default avatarMattias Hansson <hansson.mattias@gmail.com>
Reviewed-by: default avatarWolfgang Denk <wd@denx.de>
parent c4c1ed68
No related branches found
No related tags found
Loading
Loading
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