1
0
Fork 0
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:
sin-ack 2021-09-16 00:10:03 +00:00 committed by Andreas Kling
parent 0ccef94a49
commit 220b7dd779
Notes: sideshowbarker 2024-07-18 03:53:00 +09:00
3 changed files with 26 additions and 14 deletions

View file

@ -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;