diff --git a/fusee/fusee-secondary/src/kernel_patches.c b/fusee/fusee-secondary/src/kernel_patches.c index 909a066..d5ae8df 100644 --- a/fusee/fusee-secondary/src/kernel_patches.c +++ b/fusee/fusee-secondary/src/kernel_patches.c @@ -522,6 +522,10 @@ 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 3e87318..bcd80ab 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 b1cae6a..9b1bdc0 100644 --- a/stratosphere/loader/source/ldr_process_manager.cpp +++ b/stratosphere/loader/source/ldr_process_manager.cpp @@ -30,6 +30,11 @@ 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;