From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydd5Q-0005rM-FL for qemu-devel@nongnu.org; Thu, 02 Apr 2015 07:15:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ydd5I-0007sZ-N3 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 07:15:00 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:55230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydd5I-0007rp-4B for qemu-devel@nongnu.org; Thu, 02 Apr 2015 07:14:52 -0400 Message-ID: <551D24A0.9020105@huawei.com> Date: Thu, 2 Apr 2015 19:14:40 +0800 From: Gonglei MIME-Version: 1.0 References: <1427944026-8968-1-git-send-email-zhaoshenglong@huawei.com> In-Reply-To: <1427944026-8968-1-git-send-email-zhaoshenglong@huawei.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [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: Shannon Zhao , qemu-devel@nongnu.org, peter.maydell@linaro.org, sw@weilnetz.de Cc: hangaohuai@huawei.com, shannon.zhaol@linaro.org, peter.huangpeng@huawei.com, christoffer.dall@linaro.org On 2015/4/2 11:07, Shannon Zhao wrote: > 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); > Reviewed-by: Gonglei