mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 05:55:16 -04:00
kern: fix resource leak bugs
This commit is contained in:
parent
11d5353827
commit
46935fea80
4 changed files with 7 additions and 2 deletions
libraries/libmesosphere/source
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue