[Kernel] Do not retain handle in ExCreateThread

Closing the thread handle should delete the thread object
if it's finished. When this handle was retained, closing the handle
left a lingering handle reference and thus this XThread would leak
This commit is contained in:
Silent 2019-11-15 23:05:48 +01:00 committed by Rick Gibbed
parent 5bec69e983
commit 05ef022fd7
1 changed files with 0 additions and 1 deletions

View File

@ -138,7 +138,6 @@ dword_result_t ExCreateThread(lpdword_t handle_ptr, dword_t stack_size,
if (creation_flags & 0x80) { if (creation_flags & 0x80) {
*handle_ptr = thread->guest_object(); *handle_ptr = thread->guest_object();
} else { } else {
thread->RetainHandle();
*handle_ptr = thread->handle(); *handle_ptr = thread->handle();
} }
} }