aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/core/ptimer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c
index 30829ee97b..02c313542d 100644
--- a/hw/core/ptimer.c
+++ b/hw/core/ptimer.c
@@ -44,6 +44,7 @@ static void ptimer_reload(ptimer_state *s)
}
if (s->delta == 0 || s->period == 0) {
fprintf(stderr, "Timer with period zero, disabling\n");
+ timer_del(s->timer);
s->enabled = 0;
return;
}