diff options
-rw-r--r-- | dummyflasher.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dummyflasher.c b/dummyflasher.c index 0caffc9f..2d7fa858 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -390,8 +390,12 @@ int dummy_init(void) if (image_stat.st_size == emu_chip_size) { msg_pdbg("matches.\n"); msg_pdbg("Reading %s\n", emu_persistent_image); - read_buf_from_file(flashchip_contents, emu_chip_size, - emu_persistent_image); + if (read_buf_from_file(flashchip_contents, emu_chip_size, + emu_persistent_image)) { + msg_perr("Unable to read %s\n", emu_persistent_image); + free(flashchip_contents); + return 1; + } } else { msg_pdbg("doesn't match.\n"); } |