Преглед на файлове

Kernel: Use Vector::try_append in Custody::try_serialize_absolute_path

Idan Horowitz преди 3 години
родител
ревизия
6be2a51b10
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Kernel/FileSystem/Custody.cpp

+ 1 - 1
Kernel/FileSystem/Custody.cpp

@@ -59,7 +59,7 @@ ErrorOr<NonnullOwnPtr<KString>> Custody::try_serialize_absolute_path() const
     Vector<Custody const*, 32> custody_chain;
     size_t path_length = 0;
     for (auto const* custody = this; custody; custody = custody->parent()) {
-        custody_chain.append(custody);
+        TRY(custody_chain.try_append(custody));
         path_length += custody->m_name->length() + 1;
     }
     VERIFY(path_length > 0);