From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqfXW-0007NU-PB for qemu-devel@nongnu.org; Thu, 14 Apr 2016 07:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqfXT-0004vc-Cy for qemu-devel@nongnu.org; Thu, 14 Apr 2016 07:34:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqfXT-0004vO-86 for qemu-devel@nongnu.org; Thu, 14 Apr 2016 07:34:23 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 618BF15558 for ; Thu, 14 Apr 2016 11:34:22 +0000 (UTC) Date: Thu, 14 Apr 2016 13:34:20 +0200 From: Igor Mammedov Message-ID: <20160414133420.6c49cc27@nial.brq.redhat.com> In-Reply-To: <1460566660-19241-1-git-send-email-marcandre.lureau@redhat.com> References: <1460566660-19241-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] hostmem-file: plug a small leak List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com Cc: qemu-devel@nongnu.org, pbonzini@redhat.com On Wed, 13 Apr 2016 18:57:40 +0200 marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Igor Mammedov > --- > backends/hostmem-file.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > index b17a1f1..5c4b808 100644 > --- a/backends/hostmem-file.c > +++ b/backends/hostmem-file.c > @@ -121,11 +121,19 @@ file_backend_instance_init(Object *o) > set_mem_path, NULL); > } > =20 > +static void file_backend_instance_finalize(Object *o) > +{ > + HostMemoryBackendFile *fb =3D MEMORY_BACKEND_FILE(o); > + > + g_free(fb->mem_path); > +} > + > static const TypeInfo file_backend_info =3D { > .name =3D TYPE_MEMORY_BACKEND_FILE, > .parent =3D TYPE_MEMORY_BACKEND, > .class_init =3D file_backend_class_init, > .instance_init =3D file_backend_instance_init, > + .instance_finalize =3D file_backend_instance_finalize, > .instance_size =3D sizeof(HostMemoryBackendFile), > }; > =20