mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00: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:
parent
66f9a2d9ec
commit
03fcd02dfd
2 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue