mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
Plug leaks in SynthFS::remove_file().
The process spawn stress test can now run forever. :^)
This commit is contained in:
parent
3f3535213b
commit
ab72666f48
Notes:
sideshowbarker
2024-07-19 16:06:55 +09:00
Author: https://github.com/awesomekling
Commit: ab72666f48
3 changed files with 39 additions and 2 deletions
|
@ -116,8 +116,12 @@ bool SynthFS::remove_file(InodeIndex inode)
|
|||
break;
|
||||
}
|
||||
|
||||
Vector<InodeIndex> indices_to_remove;
|
||||
indices_to_remove.ensureCapacity(file.m_children.size());
|
||||
for (auto& child : file.m_children)
|
||||
remove_file(child->m_metadata.inode.index());
|
||||
indices_to_remove.unchecked_append(child->m_metadata.inode.index());
|
||||
for (auto& index : indices_to_remove)
|
||||
remove_file(index);
|
||||
m_inodes.remove(inode);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue