Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c index 094f24627f..e137e772ae 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -150,7 +150,9 @@ int load_image_targphys_as(const char *filename, return -1; } if (size > 0) { - rom_add_file_fixed_as(filename, addr, -1, as); + if (rom_add_file_fixed_as(filename, addr, -1, as) < 0) { + return -1; + } } return size; } -- 2.13.1