[NTUSER] Dereference spDefaultImc at UserCreateInputContext (#4446)

Dereference pti->spDefaultImc by UserDereferenceObject if pti->spDefaultImc is NULL at UserCreateInputContext function. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2022-04-11 10:53:36 +09:00 committed by GitHub
parent 88c1d8c737
commit 05bbbd7d8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1362,6 +1362,8 @@ PIMC FASTCALL UserCreateInputContext(ULONG_PTR dwClientImcData)
else // First time. It's the default IMC.
{
// Add the first one (default) to the list.
if (pti->spDefaultImc)
UserDereferenceObject(pti->spDefaultImc);
pti->spDefaultImc = pIMC;
pIMC->pImcNext = NULL;
}