1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

Kernel: Fix use after AK::move in Kernel::TimerQueue

This commit is contained in:
Sahan Fernando 2021-06-20 20:03:29 +10:00 committed by Andreas Kling
parent 974e996d33
commit 4f53e52ca3

View file

@ -80,8 +80,9 @@ TimerId TimerQueue::add_timer(NonnullRefPtr<Timer>&& timer)
timer->m_id = ++m_timer_id_count;
VERIFY(timer->m_id != 0); // wrapped
auto id = timer->m_id;
add_timer_locked(move(timer));
return timer->m_id;
return id;
}
void TimerQueue::add_timer_locked(NonnullRefPtr<Timer> timer)