Use tmemCloseHandle in nvInitialize uncoditionally

This commit is contained in:
MasaGratoR 2023-04-14 16:58:25 +02:00 committed by GitHub
parent ceb76d5796
commit a973bdbc26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,9 +54,11 @@ Result _nvInitialize(void) {
if (R_SUCCEEDED(rc)) if (R_SUCCEEDED(rc))
rc = _nvCmdInitialize(CUR_PROCESS_HANDLE, g_nvTransfermem.handle, tmem_size); rc = _nvCmdInitialize(CUR_PROCESS_HANDLE, g_nvTransfermem.handle, tmem_size);
Result rc2 = tmemCloseHandle(&g_nvTransfermem);
if (R_SUCCEEDED(rc)) if (R_SUCCEEDED(rc))
rc = tmemCloseHandle(&g_nvTransfermem); rc = rc2;
// Clone the session handle - the cloned session is used to execute certain commands in parallel // Clone the session handle - the cloned session is used to execute certain commands in parallel
if (R_SUCCEEDED(rc)) if (R_SUCCEEDED(rc))