diff options
-rw-r--r-- | dummyflasher.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dummyflasher.c b/dummyflasher.c index f1711282d..8c3606e42 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -381,8 +381,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"); } |