[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:
parent
5bec69e983
commit
05ef022fd7
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue