Commit 77e205a5 authored by Gonglei's avatar Gonglei Committed by Paolo Bonzini

mips_mipssim: fix use-after-free for filename

May pass freed pointer filename as an argument to error_report.
Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment