summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-12-29 14:13:12 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2021-12-29 15:46:14 +0200
commit9d034785de89187f2722c444740e3333f4c23926 (patch)
tree94de9922dc92eafdeac2377f13cbaf59c642ed91 /Kernel/FileSystem
parent6dee1e91bef297474870722c4cbfd7007cf4d8ce (diff)
downloadserenity-9d034785de89187f2722c444740e3333f4c23926.zip
Kernel: Make File::unref virtual
This is required for SlavePTY's custom unref handler to function correctly, as otherwise a SlavePTY held in a File RefPtr would call the base's (RefCounted<>) unref method instead of SlavePTY's version.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/File.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/FileSystem/File.h b/Kernel/FileSystem/File.h
index b4f4124a8a..c3396fc74e 100644
--- a/Kernel/FileSystem/File.h
+++ b/Kernel/FileSystem/File.h
@@ -74,6 +74,7 @@ class File
: public RefCounted<File>
, public Weakable<File> {
public:
+ virtual bool unref() const { return RefCounted<File>::unref(); }
virtual void will_be_destroyed() { }
virtual ~File();