summary refs log tree commit diff stats
path: root/hw/arm/virt.c
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-04-02 11:07:06 +0800
committerPeter Maydell <peter.maydell@linaro.org>2015-04-02 12:10:36 +0100
commitc408d27a42318227092128b04cca555f78cf703d (patch)
treef09b3138c31793e80f342648195282cf786635da /hw/arm/virt.c
parent289494da25c5d6270e66a40267fd761ee8f54a90 (diff)
downloadfocaccia-qemu-c408d27a42318227092128b04cca555f78cf703d.tar.gz
focaccia-qemu-c408d27a42318227092128b04cca555f78cf703d.zip
hw/arm/virt: Fix corruption due to double free
As 4de9a88(hw/arm/virt: Fix memory leak reported by Coverity)
and 6e05a12(arm: fix memory leak) both handle the memory leak
reported by Coverity, this cause qemu corruption due to
double free.

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1427944026-8968-1-git-send-email-zhaoshenglong@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r--hw/arm/virt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 7d082e233c..febff22768 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -572,7 +572,6 @@ static void create_flash(const VirtBoardInfo *vbi)
             error_report("Could not load ROM image '%s'", bios_name);
             exit(1);
         }
-        g_free(fn);
     }
 
     create_one_flash("virt.flash0", flashbase, flashsize);