1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-22 18:32:05 +00:00

fs: allocations with mutex held must be unsafe

This commit is contained in:
Michael Scire 2021-12-06 20:35:48 -08:00 committed by SciresM
parent 64b4cc25fc
commit f3dbdc2391

View file

@ -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<T, Impl>;