From e24c6dab93d00676dfb22743534825bb6aa90d7c Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 28 Jan 2021 21:49:47 -0800 Subject: [PATCH] hle: kernel: KThread: Release thread resource on thread exit. --- src/core/hle/kernel/k_thread.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 45ad589d9..aa100e139 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -247,6 +247,7 @@ void KThread::Finalize() { // Decrement the parent process's thread count. if (parent != nullptr) { parent->DecrementThreadCount(); + parent->GetResourceLimit()->Release(ResourceType::Threads, 1); } }