diff --git a/fusee/fusee-secondary/src/kernel_patches.c b/fusee/fusee-secondary/src/kernel_patches.c index 909a066aa..d5ae8df7b 100644 --- a/fusee/fusee-secondary/src/kernel_patches.c +++ b/fusee/fusee-secondary/src/kernel_patches.c @@ -522,6 +522,10 @@ void package2_patch_kernel(void *_kernel, size_t size, bool is_sd_kernel) { fatal_error("kernel_patcher: unable to identify kernel!\n"); } + if (kernel_info == NULL && is_sd_kernel) { + return; + } + /* Apply hooks. */ uint8_t *kernel = (uint8_t *)_kernel; size_t free_space_offset = kernel_info->free_code_space_offset; diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index 3e8731809..bcd80ab44 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit 3e873180905d411472722783162e6e4ee8158cfb +Subproject commit bcd80ab445258c20d968aad1c083fd8cb0937bee diff --git a/stratosphere/loader/source/ldr_process_manager.cpp b/stratosphere/loader/source/ldr_process_manager.cpp index b1cae6ac4..9b1bdc03a 100644 --- a/stratosphere/loader/source/ldr_process_manager.cpp +++ b/stratosphere/loader/source/ldr_process_manager.cpp @@ -30,6 +30,11 @@ Result ProcessManagerService::CreateProcess(Out proc_h, u64 index, fprintf(stderr, "CreateProcess(%016lx, %08x, %08x);\n", index, flags, reslimit_h.handle); + ON_SCOPE_EXIT { + /* Loader doesn't persist the copied resource limit handle. */ + svcCloseHandle(reslimit_h.handle); + }; + rc = Registration::GetRegisteredTidSid(index, &tid_sid); if (R_FAILED(rc)) { return rc;