提交 654598c9 编写于 作者: M Markus Armbruster 提交者: Stefan Hajnoczi

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: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 3528a3cb
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册