mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
Kernel: Weakly hold on to the file in LocalSocket
Because we were holding a strong ref to the OpenFileDescription in LocalSocket and a strong ref to the LocalSocket in Inode, we were creating a reference cycle in the event of the socket being cleaned up after the file description did (i.e. unlinking the file before closing the socket), because the file description never got destructed.
This commit is contained in:
parent
0ccef94a49
commit
220b7dd779
Notes:
sideshowbarker
2024-07-18 03:53:00 +09:00
Author: https://github.com/sin-ack
Commit: 220b7dd779
Pull-request: https://github.com/SerenityOS/serenity/pull/10050
3 changed files with 26 additions and 14 deletions
|
@ -23,7 +23,8 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
class Inode : public ListedRefCounted<Inode> {
|
||||
class Inode : public ListedRefCounted<Inode>
|
||||
, public Weakable<Inode> {
|
||||
friend class VirtualFileSystem;
|
||||
friend class FileSystem;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue