pc_sysfw: Plug memory leak on pc_fw_add_pflash_drv() error path
Harmless, because we the error inevitably leads to another, fatal one in pc_system_flash_init(): PC system firmware (pflash) not available. Fix it anyway. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
3528a3cba1
commit
654598c944
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user