mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
VM: Fix leaking PhysicalPage instances.
After PhysicalPage::return_to_freelist(), an actual physical page is returned back to the memory manager; which will create a new PhysicalPage instance if it decides to reuse the physical page. This means this PhysicalPage instance should be freed; otherwise it would get leaked.
This commit is contained in:
parent
118cb391dd
commit
6bb7c80365
Notes:
sideshowbarker
2024-07-19 13:36:50 +09:00
Author: https://github.com/bugaevc
Commit: 6bb7c80365
Pull-request: https://github.com/SerenityOS/serenity/pull/229
1 changed files with 1 additions and 2 deletions
|
@ -24,7 +24,6 @@ public:
|
|||
if (!--m_retain_count) {
|
||||
if (m_may_return_to_freelist)
|
||||
move(*this).return_to_freelist();
|
||||
else
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue