kernel: fix resource limit imbalance

This commit is contained in:
Liam
2023-12-18 15:38:50 -05:00
parent db7b2bc8f1
commit c57ae803a6
3 changed files with 7 additions and 8 deletions

View File

@ -151,8 +151,8 @@ public:
if (manager->IsDomain()) {
context->AddDomainObject(std::move(iface));
} else {
kernel.ApplicationProcess()->GetResourceLimit()->Reserve(
Kernel::LimitableResource::SessionCountMax, 1);
ASSERT(Kernel::GetCurrentProcess(kernel).GetResourceLimit()->Reserve(
Kernel::LimitableResource::SessionCountMax, 1));
auto* session = Kernel::KSession::Create(kernel);
session->Initialize(nullptr, 0);