Received: from eggs.gnu.org ([2001:4830:134:3::10]:43075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1xN7-00056A-AW for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:18:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1xN2-00022B-Jg for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:18:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1xN2-00021m-Dl for qemu-devel@nongnu.org; Thu, 26 Nov 2015 09:18:00 -0500 Date: Thu, 26 Nov 2015 15:17:56 +0100 From: Igor Mammedov Message-ID: <20151126151756.624efa23@nial.brq.redhat.com> In-Reply-To: <1448539212-7080-1-git-send-email-opensource.dxs@aliyun.com> References: <1448539212-7080-1-git-send-email-opensource.dxs@aliyun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Fix memory leak on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Stefano Dong (=?UTF-8?B?6JGj5YW05rC0?=)" Cc: agraf@suse.de, zhugh.fnst@cn.fujitsu.com, mst@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, zhongguocheng@huawei.com On Thu, 26 Nov 2015 12:00:12 +0000 Stefano Dong (=E8=91=A3=E5=85=B4=E6=B0=B4) wrot= e: > hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 > hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in = 34f2af3d >=20 > Signed-off-by: Stefano Dong (=E8=91=A3=E5=85=B4=E6=B0=B4) Reviewed-by: Igor Mammedov > --- > hw/acpi/memory_hotplug.c | 1 + > hw/ppc/spapr.c | 1 + > 2 files changed, 2 insertions(+) >=20 > diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c > index ce428df..e4b9a01 100644 > --- a/hw/acpi/memory_hotplug.c > +++ b/hw/acpi/memory_hotplug.c > @@ -155,6 +155,7 @@ static void acpi_memory_hotplug_write(void *opaque, h= waddr addr, uint64_t data, > qapi_event_send_mem_unplug_error(dev->id, > error_get_pretty(local_= err), > &error_abort); > + error_free(local_err); > break; > } > trace_mhp_acpi_pc_dimm_deleted(mem_st->selector); > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 030ee35..3bb8bcd 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -125,6 +125,7 @@ static XICSState *xics_system_init(MachineState *mach= ine, > error_report("kernel_irqchip requested but unavailable: %s", > error_get_pretty(err)); > } > + error_free(err); > } > =20 > if (!icp) {