aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-11-11 08:40:05 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-11-11 09:36:05 +0100
commitfc1c5de54746857cc7b21e44b83b042792b3ddaa (patch)
tree2ffd4e4b9ba6f2e33a8e46752bee01ad360df85d
parent8a74805ea6c41e8e17983da6cec06e2466c072d1 (diff)
Fixed pointer corruption bug in timer.c
-rw-r--r--src/common/timer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/timer.c b/src/common/timer.c
index d13414a..955d790 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -101,12 +101,14 @@ int timer_running(struct timer *timer)
void process_timer(void)
{
- struct timer *timer = timer_head;
+ struct timer *timer;
double now;
now = get_time();
again:
+ timer = timer_head;
+
while (timer) {
if (timer->linked && timer->timeout > 0 && now >= timer->timeout) {
timer->timeout = 0;