diff options
| author | Mattias Hansson <[email protected]> | 2021-11-24 13:10:49 +0100 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2022-02-05 13:38:39 +0100 |
| commit | eb1c716c6dd14e8fe97ea9a1a2211c27edf3cfb2 (patch) | |
| tree | 630d9165b5ed9fdd0d422ec929f946d66d607167 /include | |
| 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 <[email protected]>
Reviewed-by: Wolfgang Denk <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
