aboutsummaryrefslogtreecommitdiff
path: root/hw/rtc/exynos4210_rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rtc/exynos4210_rtc.c')
-rw-r--r--hw/rtc/exynos4210_rtc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/rtc/exynos4210_rtc.c b/hw/rtc/exynos4210_rtc.c
index 4c97624..45c0a95 100644
--- a/hw/rtc/exynos4210_rtc.c
+++ b/hw/rtc/exynos4210_rtc.c
@@ -584,6 +584,14 @@ static void exynos4210_rtc_init(Object *obj)
sysbus_init_mmio(dev, &s->iomem);
}
+static void exynos4210_rtc_finalize(Object *obj)
+{
+ Exynos4210RTCState *s = EXYNOS4210_RTC(obj);
+
+ ptimer_free(s->ptimer);
+ ptimer_free(s->ptimer_1Hz);
+}
+
static void exynos4210_rtc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -597,6 +605,7 @@ static const TypeInfo exynos4210_rtc_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210RTCState),
.instance_init = exynos4210_rtc_init,
+ .instance_finalize = exynos4210_rtc_finalize,
.class_init = exynos4210_rtc_class_init,
};