https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83dbb6b27e4d36d798a66…
commit 83dbb6b27e4d36d798a66b0807ba1fb1731bd3eb
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Sat May 8 00:32:14 2021 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sat May 8 00:32:14 2021 +0300
[NTOS:PS] Do not leak the Thread. Addendum to 0c8f0785
---
ntoskrnl/ps/query.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c
index 968b24623ef..895c2db5d0d 100644
--- a/ntoskrnl/ps/query.c
+++ b/ntoskrnl/ps/query.c
@@ -2469,6 +2469,7 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
{
/* Fail */
Status = STATUS_INVALID_PARAMETER;
+ ObDereferenceObject(Thread);
break;
}