core: hle: service: sm: Fix KPort reference count.

master
bunnei 2022-03-11 00:09:01 +07:00
parent 25c0acc388
commit 8873c0c3db
1 changed files with 2 additions and 0 deletions

@ -81,6 +81,8 @@ ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name
}
auto* port = Kernel::KPort::Create(kernel);
SCOPE_EXIT({ port->Close(); });
port->Initialize(ServerSessionCountMax, false, name);
auto handler = it->second;
port->GetServerPort().SetSessionHandler(std::move(handler));