From 83dbb6b27e4d36d798a66b0807ba1fb1731bd3eb Mon Sep 17 00:00:00 2001 From: Stanislav Motylkov Date: Sat, 8 May 2021 00:32:14 +0300 Subject: [PATCH] [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; }