mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTUSER] Fix KVM and VBox tests (#4235)
KVM and VBox tests was failing since d5deacd
- Check NULL at UserFreeInputContext and UserDestroyInputContext functions.
- Move UserMarkObjectDestroy into the UserDestroyInputContext function.
CORE-11700
This commit is contained in:
parent
ee132a05ba
commit
757bed81b1
1 changed files with 12 additions and 4 deletions
|
@ -224,10 +224,14 @@ AllocInputContextObject(PDESKTOP pDesk,
|
|||
VOID UserFreeInputContext(PVOID Object)
|
||||
{
|
||||
PIMC pIMC = Object, pImc0;
|
||||
PTHREADINFO pti = pIMC->head.pti;
|
||||
PTHREADINFO pti;
|
||||
|
||||
UserMarkObjectDestroy(Object);
|
||||
if (!pIMC)
|
||||
return;
|
||||
|
||||
pti = pIMC->head.pti;
|
||||
|
||||
/* Find the IMC in the list and remove it */
|
||||
for (pImc0 = pti->spDefaultImc; pImc0; pImc0 = pImc0->pImcNext)
|
||||
{
|
||||
if (pImc0->pImcNext == pIMC)
|
||||
|
@ -237,7 +241,7 @@ VOID UserFreeInputContext(PVOID Object)
|
|||
}
|
||||
}
|
||||
|
||||
UserHeapFree(Object);
|
||||
UserHeapFree(pIMC);
|
||||
|
||||
pti->ppi->UserHandleCount--;
|
||||
IntDereferenceThreadInfo(pti);
|
||||
|
@ -246,7 +250,11 @@ VOID UserFreeInputContext(PVOID Object)
|
|||
BOOLEAN UserDestroyInputContext(PVOID Object)
|
||||
{
|
||||
PIMC pIMC = Object;
|
||||
if (pIMC)
|
||||
{
|
||||
UserMarkObjectDestroy(pIMC);
|
||||
UserDeleteObject(pIMC->head.h, TYPE_INPUTCONTEXT);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue