hle: kernel: KThread: Release thread resource on thread exit.

merge-requests/60/head
bunnei 2021-01-28 21:49:47 +07:00
parent 10738839ad
commit e24c6dab93
1 changed files with 1 additions and 0 deletions

@ -247,6 +247,7 @@ void KThread::Finalize() {
// Decrement the parent process's thread count. // Decrement the parent process's thread count.
if (parent != nullptr) { if (parent != nullptr) {
parent->DecrementThreadCount(); parent->DecrementThreadCount();
parent->GetResourceLimit()->Release(ResourceType::Threads, 1);
} }
} }