From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdVUf-0005Qh-0J for qemu-devel@nongnu.org; Wed, 01 Apr 2015 23:08:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdVUa-0005Ed-NA for qemu-devel@nongnu.org; Wed, 01 Apr 2015 23:08:32 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:38766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdVUa-0005E3-4g for qemu-devel@nongnu.org; Wed, 01 Apr 2015 23:08:28 -0400 From: Shannon Zhao Date: Thu, 2 Apr 2015 11:07:06 +0800 Message-ID: <1427944026-8968-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] hw/arm/virt: Fix corruption due to double free List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org, sw@weilnetz.de, arei.gonglei@huawei.com Cc: hangaohuai@huawei.com, shannon.zhaol@linaro.org, peter.huangpeng@huawei.com, christoffer.dall@linaro.org From: Shannon Zhao 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 Signed-off-by: Shannon Zhao --- hw/arm/virt.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 7d082e2..febff22 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); -- 1.7.1