From 6be2a51b10d5e0b85dcd135997502c2fa44e56e9 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 11 Jan 2022 21:20:39 +0200 Subject: [PATCH] Kernel: Use Vector::try_append in Custody::try_serialize_absolute_path --- Kernel/FileSystem/Custody.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/FileSystem/Custody.cpp b/Kernel/FileSystem/Custody.cpp index 81532d731fc..5e5e98edc1b 100644 --- a/Kernel/FileSystem/Custody.cpp +++ b/Kernel/FileSystem/Custody.cpp @@ -59,7 +59,7 @@ ErrorOr> Custody::try_serialize_absolute_path() const Vector 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);