Kernel: Propagate Vector append failures from Inode::apply_flock()

This commit is contained in:
Andreas Kling 2021-11-18 13:33:09 +01:00
parent d106f20a73
commit b285323d91

View file

@ -336,7 +336,7 @@ ErrorOr<void> Inode::apply_flock(Process const& process, OpenFileDescription con
return EINVAL;
}
m_flocks.append(Flock { new_lock.l_start, new_lock.l_len, &description, process.pid().value(), new_lock.l_type });
TRY(m_flocks.try_append(Flock { new_lock.l_start, new_lock.l_len, &description, process.pid().value(), new_lock.l_type }));
return {};
}