diff options
| -rw-r--r-- | src/core/hle/service/sm/sm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index eaa172595..695a1faa6 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp | |||
| @@ -81,6 +81,8 @@ ResultVal<Kernel::KPort*> ServiceManager::GetServicePort(const std::string& name | |||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | auto* port = Kernel::KPort::Create(kernel); | 83 | auto* port = Kernel::KPort::Create(kernel); |
| 84 | SCOPE_EXIT({ port->Close(); }); | ||
| 85 | |||
| 84 | port->Initialize(ServerSessionCountMax, false, name); | 86 | port->Initialize(ServerSessionCountMax, false, name); |
| 85 | auto handler = it->second; | 87 | auto handler = it->second; |
| 86 | port->GetServerPort().SetSessionHandler(std::move(handler)); | 88 | port->GetServerPort().SetSessionHandler(std::move(handler)); |