aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pc_sysfw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c
index 9d7c5f4003..40bced2322 100644
--- a/hw/pc_sysfw.c
+++ b/hw/pc_sysfw.c
@@ -98,7 +98,9 @@ static void pc_fw_add_pflash_drv(void)
return;
}
- drive_init(opts, machine->use_scsi);
+ if (!drive_init(opts, machine->use_scsi)) {
+ qemu_opts_del(opts);
+ }
}
static void pc_system_flash_init(MemoryRegion *rom_memory,