提交 77e205a5 编写于 作者: G Gonglei 提交者: Paolo Bonzini

mips_mipssim: fix use-after-free for filename

May pass freed pointer filename as an argument to error_report.
Signed-off-by: NGonglei <arei.gonglei@huawei.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d4754a95
......@@ -197,7 +197,7 @@ mips_mipssim_init(MachineState *machine)
!kernel_filename && !qtest_enabled()) {
/* Bail out if we have neither a kernel image nor boot vector code. */
error_report("Could not load MIPS bios '%s', and no "
"-kernel argument was specified", filename);
"-kernel argument was specified", bios_name);
exit(1);
} else {
/* We have a boot vector start address. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册