https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83dbb6b27e4d36d798a66b0807ba1fb1731bd3eb

commit 83dbb6b27e4d36d798a66b0807ba1fb1731bd3eb
Author:     Stanislav Motylkov <[email protected]>
AuthorDate: Sat May 8 00:32:14 2021 +0300
Commit:     Stanislav Motylkov <[email protected]>
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;
             }
 

Reply via email to