diff options
author | Mattias Hansson | 2021-11-24 13:10:49 +0100 |
---|---|---|
committer | Stefano Babic | 2022-02-05 13:38:39 +0100 |
commit | eb1c716c6dd14e8fe97ea9a1a2211c27edf3cfb2 (patch) | |
tree | 630d9165b5ed9fdd0d422ec929f946d66d607167 /api/api_display.c | |
parent | c4c1ed68c1e85ed3100840e395d40294d38f5f7c (diff) |
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: Mattias Hansson <hansson.mattias@gmail.com>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'api/api_display.c')
0 files changed, 0 insertions, 0 deletions