1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

Kernel: Fix leaking Timer instances

When a Timer is queued we add a reference, so whenever we remove
a timer or fire it we should drop that reference.

Fixes #4382
This commit is contained in:
Tom 2020-12-11 11:07:42 -07:00 committed by Andreas Kling
parent 66f9a2d9ec
commit 03fcd02dfd
Notes: sideshowbarker 2024-07-19 00:55:23 +09:00
2 changed files with 7 additions and 3 deletions

View file

@ -97,7 +97,7 @@ public:
bool cancel_timer(Timer&);
bool cancel_timer(NonnullRefPtr<Timer>&& timer)
{
return cancel_timer(timer.leak_ref());
return cancel_timer(*move(timer));
}
void fire();