From f3dbdc2391ce63706cc8b71714a2b94cae0dae35 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 6 Dec 2021 20:35:48 -0800 Subject: [PATCH] fs: allocations with mutex held must be unsafe --- .../include/stratosphere/fs/fs_memory_management.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/fs/fs_memory_management.hpp b/libraries/libstratosphere/include/stratosphere/fs/fs_memory_management.hpp index c59068cb8..8bc884d19 100644 --- a/libraries/libstratosphere/include/stratosphere/fs/fs_memory_management.hpp +++ b/libraries/libstratosphere/include/stratosphere/fs/fs_memory_management.hpp @@ -97,9 +97,9 @@ namespace ams::fs { Impl::LockAllocatorMutex(); /* Check that we can allocate memory (using overestimate of 0x80 + sizeof(T)). */ - if (auto * const p = Impl::Allocate(0x80 + sizeof(T)); AMS_LIKELY(p != nullptr)) { + if (auto * const p = Impl::AllocateUnsafe(0x80 + sizeof(T)); AMS_LIKELY(p != nullptr)) { /* Free the memory we allocated. */ - Impl::Deallocate(p, 0x80 + sizeof(T)); + Impl::DeallocateUnsafe(p, 0x80 + sizeof(T)); /* Get allocator type. */ using AllocatorType = AllocatorTemplateT;