diff options
author | Marc-André Lureau | 2016-07-15 10:58:05 +0200 |
---|---|---|
committer | Marc-André Lureau | 2016-09-08 16:05:22 +0200 |
commit | e9529768d4786414725a9675991aeb466a6d600c (patch) | |
tree | 166921ceb06989264ea5bcf62af8889f5b7b3313 /hw/ipmi/ipmi_bmc_extern.c | |
parent | sd: free timer (diff) | |
download | qemu-e9529768d4786414725a9675991aeb466a6d600c.tar.gz qemu-e9529768d4786414725a9675991aeb466a6d600c.tar.xz qemu-e9529768d4786414725a9675991aeb466a6d600c.zip |
ipmi: free extern timer
Free the timer allocated during instance init.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'hw/ipmi/ipmi_bmc_extern.c')
-rw-r--r-- | hw/ipmi/ipmi_bmc_extern.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 157879e177..5b73983e7d 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); } +static void ipmi_bmc_extern_finalize(Object *obj) +{ + IPMIBmcExtern *ibe = IPMI_BMC_EXTERN(obj); + + timer_del(ibe->extern_timer); + timer_free(ibe->extern_timer); +} + static Property ipmi_bmc_extern_properties[] = { DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr), DEFINE_PROP_END_OF_LIST(), @@ -508,6 +516,7 @@ static const TypeInfo ipmi_bmc_extern_type = { .parent = TYPE_IPMI_BMC, .instance_size = sizeof(IPMIBmcExtern), .instance_init = ipmi_bmc_extern_init, + .instance_finalize = ipmi_bmc_extern_finalize, .class_init = ipmi_bmc_extern_class_init, }; |