mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +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
1 changed files with 1 additions and 2 deletions
|
@ -24,8 +24,7 @@ public:
|
|||
if (!--m_retain_count) {
|
||||
if (m_may_return_to_freelist)
|
||||
move(*this).return_to_freelist();
|
||||
else
|
||||
delete this;
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue