diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-30 21:09:23 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-05-31 17:09:12 +0430 |
commit | 2b5732ab7751a9f9111ab24771c0bcfc3550ab2e (patch) | |
tree | 29eb1e83e861bae70d3322e72e4b67e25b6fbf1c /Kernel/FileSystem/ProcFS.cpp | |
parent | 3bc2527ce7780e7d9bbe1290e7edf044622b8314 (diff) | |
download | serenity-2b5732ab7751a9f9111ab24771c0bcfc3550ab2e.zip |
AK+Kernel: Disallow implicitly lifting pointers to OwnPtr's
This doesn't really _fix_ anything, it just gets rid of the API and
instead makes the users explicitly use `adopt_own_if_non_null()`.
Diffstat (limited to 'Kernel/FileSystem/ProcFS.cpp')
-rw-r--r-- | Kernel/FileSystem/ProcFS.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 2ba826b07d..fc458844aa 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -1102,7 +1102,7 @@ KResult ProcFSInode::refresh_data(FileDescription& description) const } if (!cached_data) - cached_data = new ProcFSInodeData; + cached_data = adopt_own_if_nonnull(new ProcFSInodeData); auto& buffer = static_cast<ProcFSInodeData&>(*cached_data).buffer; if (buffer) { // If we're reusing the buffer, reset the size to 0 first. This |