Received: from eggs.gnu.org ([2001:4830:134:3::10]:41726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSmTj-0000vC-SC for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSmTi-000115-I1 for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSmTi-00010y-CK for qemu-devel@nongnu.org; Thu, 28 Jul 2016 10:40:02 -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 EB667C057FAA for ; Thu, 28 Jul 2016 14:40:01 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Thu, 28 Jul 2016 18:37:59 +0400 Message-Id: <20160728143808.13707-29-marcandre.lureau@redhat.com> In-Reply-To: <20160728143808.13707-1-marcandre.lureau@redhat.com> References: <20160728143808.13707-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 28/37] ipmi: free extern timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau Free the timer allocated during instance init. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 157879e..5b73983 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -487,6 +487,14 @@ static void ipmi_bmc_extern_init(Object *obj) vmstate_register(NULL, 0, &vmstate_ipmi_bmc_extern, ibe); } =20 +static void ipmi_bmc_extern_finalize(Object *obj) +{ + IPMIBmcExtern *ibe =3D IPMI_BMC_EXTERN(obj); + + timer_del(ibe->extern_timer); + timer_free(ibe->extern_timer); +} + static Property ipmi_bmc_extern_properties[] =3D { DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr), DEFINE_PROP_END_OF_LIST(), @@ -508,6 +516,7 @@ static const TypeInfo ipmi_bmc_extern_type =3D { .parent =3D TYPE_IPMI_BMC, .instance_size =3D sizeof(IPMIBmcExtern), .instance_init =3D ipmi_bmc_extern_init, + .instance_finalize =3D ipmi_bmc_extern_finalize, .class_init =3D ipmi_bmc_extern_class_init, }; =20 --=20 2.9.0