Skip to content

Commit

Permalink
Kernel: Fix use after AK::move in Kernel::TimerQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapitalK authored and awesomekling committed Jun 25, 2021
1 parent 974e996 commit 4f53e52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Kernel/TimerQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f53e52

Please sign in to comment.