summaryrefslogtreecommitdiffstats
path: root/hw/mips/mips_mipssim.c
diff options
context:
space:
mode:
authorGonglei2014-11-15 11:06:41 +0100
committerPaolo Bonzini2014-11-17 11:41:03 +0100
commit77e205a52856adffdd5db70449a8604aa9f66e74 (patch)
tree7f2ef5b27bebee16027eca69b0a87992b2f4658c /hw/mips/mips_mipssim.c
parentl2tpv3: fix fd leak (diff)
downloadqemu-77e205a52856adffdd5db70449a8604aa9f66e74.tar.gz
qemu-77e205a52856adffdd5db70449a8604aa9f66e74.tar.xz
qemu-77e205a52856adffdd5db70449a8604aa9f66e74.zip
mips_mipssim: fix use-after-free for filename
May pass freed pointer filename as an argument to error_report. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/mips/mips_mipssim.c')
-rw-r--r--hw/mips/mips_mipssim.c2
1 files changed, 1 insertions, 1 deletions
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. */