From 26e30faff3e4489ede6444f895c7f6a7eae78d2d Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 24 Mar 2023 07:56:54 -0300 Subject: [PATCH] Fix handle leak on IShopServiceAccessServerInterface.CreateServerInterface (#4591) --- .../HOS/Services/Nim/IShopServiceAccessServerInterface.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs index 98f5f6a892..342f1ba1b8 100644 --- a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs @@ -14,6 +14,9 @@ namespace Ryujinx.HLE.HOS.Services.Nim // CreateServerInterface(pid, handle, u64) -> object public ResultCode CreateServerInterface(ServiceCtx context) { + // Close transfer memory immediately as we don't use it. + context.Device.System.KernelContext.Syscall.CloseHandle(context.Request.HandleDesc.ToCopy[0]); + MakeObject(context, new IShopServiceAccessServer()); Logger.Stub?.PrintStub(LogClass.ServiceNim);