
24 Nov
2021
24 Nov
'21
1:22 p.m.
Dear Mattias Hansson,
In message 20211124121049.24054-1-hansson.mattias@gmail.com you wrote:
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
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Time is a drug. Too much of it kills you.
- Terry Pratchett, _Small Gods_