aboutsummaryrefslogtreecommitdiff
path: root/hw/timer/arm_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/timer/arm_timer.c')
-rw-r--r--hw/timer/arm_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 15caff0e41..84cf2726bb 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -176,7 +176,7 @@ static arm_timer_state *arm_timer_init(uint32_t freq)
{
arm_timer_state *s;
- s = (arm_timer_state *)g_malloc0(sizeof(arm_timer_state));
+ s = g_new0(arm_timer_state, 1);
s->freq = freq;
s->control = TIMER_CTRL_IE;