mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
Kernel: Fix use after AK::move in Kernel::TimerQueue
This commit is contained in:
parent
974e996d33
commit
4f53e52ca3
Notes:
sideshowbarker
2024-07-18 11:31:32 +09:00
Author: https://github.com/ccapitalK
Commit: 4f53e52ca3
Pull-request: https://github.com/SerenityOS/serenity/pull/7130
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/IdanHo
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue