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:
Markus Armbruster 2012-11-23 19:12:18 +01:00 committed by Stefan Hajnoczi
parent 3528a3cba1
commit 654598c944

View File

@ -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,