kern: fix resource leak bugs

This commit is contained in:
Michael Scire 2020-07-23 19:26:46 -07:00 committed by SciresM
parent 11d5353827
commit 46935fea80
4 changed files with 7 additions and 2 deletions
libraries/libmesosphere/source

View file

@ -796,7 +796,7 @@ namespace ams::kern {
R_UNLESS(stack_size + this->code_size >= this->code_size, svc::ResultOutOfMemory());
/* Place a tentative reservation of memory for our new stack. */
KScopedResourceReservation mem_reservation(this, ams::svc::LimitableResource_PhysicalMemoryMax);
KScopedResourceReservation mem_reservation(this, ams::svc::LimitableResource_PhysicalMemoryMax, stack_size);
R_UNLESS(mem_reservation.Succeeded(), svc::ResultLimitReached());
/* Allocate and map our stack. */