https://git.reactos.org/?p=reactos.git;a=commitdiff;h=27955da7ee6c9c51f66de…
commit 27955da7ee6c9c51f66de73022ea2615b8d29ff0
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Tue Jan 4 03:12:12 2022 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Tue Jan 4 03:12:12 2022 +0300
[WIN32K:NTUSER] Fix one more reference leak
Addendum to d5deacd9 and 2a2f8dbe. CORE-11700
---
win32ss/user/ntuser/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/main.c b/win32ss/user/ntuser/main.c
index 8daf15ba95d..fd2eed2aa79 100644
--- a/win32ss/user/ntuser/main.c
+++ b/win32ss/user/ntuser/main.c
@@ -654,7 +654,11 @@ InitThreadCallback(PETHREAD Thread)
/* Create the default input context */
if (IS_IMM_MODE())
{
- UserCreateInputContext(0);
+ PIMC pIMC = UserCreateInputContext(0);
+ if (pIMC)
+ {
+ UserDereferenceObject(pIMC);
+ }
}
/* Last things to do only if we are not a SYSTEM or CSRSS thread */