kernel: fix resource limit imbalance
This commit is contained in:
parent
db7b2bc8f1
commit
c57ae803a6
3 changed files with 7 additions and 8 deletions
|
@ -58,8 +58,8 @@ Result KClientPort::CreateSession(KClientSession** out) {
|
|||
KSession* session{};
|
||||
|
||||
// Reserve a new session from the resource limit.
|
||||
KScopedResourceReservation session_reservation(
|
||||
GetCurrentProcessPointer(m_kernel)->GetResourceLimit(), LimitableResource::SessionCountMax);
|
||||
KScopedResourceReservation session_reservation(GetCurrentProcessPointer(m_kernel),
|
||||
LimitableResource::SessionCountMax);
|
||||
R_UNLESS(session_reservation.Succeeded(), ResultLimitReached);
|
||||
|
||||
// Allocate a session normally.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue