From: Gonglei Date: Sat, 15 Nov 2014 10:06:41 +0000 (+0800) Subject: mips_mipssim: fix use-after-free for filename X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=77e205a52856adffdd5db70449a8604aa9f66e74;p=qemu.git mips_mipssim: fix use-after-free for filename May pass freed pointer filename as an argument to error_report. Signed-off-by: Gonglei Signed-off-by: Paolo Bonzini --- diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c index 7ea0b9a5c9..5d44c3f73d 100644 --- a/hw/mips/mips_mipssim.c +++ b/hw/mips/mips_mipssim.c @@ -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. */