kern: fix resource leak bugs

This commit is contained in:
Michael Scire authored and SciresM committed 2020-07-31 14:50:52 -07:00
1 parent 11d5353827
commit 46935fea80
4 files changed
+7 -2

No files matched your search

@@ -143,7 +143,7 @@ namespace ams::kern {
this->num_kernel_waiters = 0;
this->entrypoint = reinterpret_cast<uintptr_t>(func);
/* We don't need a release (probably), and we've spent no time on the cpu. */
/* We haven't released our resource limit hint, and we've spent no time on the cpu. */
this->resource_limit_release_hint = 0;
this->cpu_time = 0;
@@ -825,6 +825,7 @@ namespace ams::kern {
/* Release the thread resource hint from parent. */
if (this->parent != nullptr) {
this->parent->ReleaseResource(ams::svc::LimitableResource_ThreadCountMax, 0, 1);
this->resource_limit_release_hint = true;
}
/* Perform termination. */