mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Close the desktop handle after getting the object pointer.
svn path=/trunk/; revision=14563
This commit is contained in:
parent
a16ba46cd2
commit
3985d6c980
1 changed files with 12 additions and 13 deletions
|
@ -195,23 +195,22 @@ Win32kThreadCallback (struct _ETHREAD *Thread,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Win32Thread->hDesktop = hDesk;
|
if (hDesk != NULL)
|
||||||
|
|
||||||
Status = ObReferenceObjectByHandle(hDesk,
|
|
||||||
0,
|
|
||||||
ExDesktopObjectType,
|
|
||||||
KernelMode,
|
|
||||||
(PVOID*)&Win32Thread->Desktop,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to reference thread desktop handle 0x%x\n", hDesk);
|
Status = ObReferenceObjectByHandle(hDesk,
|
||||||
Win32Thread->Desktop = NULL;
|
0,
|
||||||
|
ExDesktopObjectType,
|
||||||
|
KernelMode,
|
||||||
|
(PVOID*)&Win32Thread->Desktop,
|
||||||
|
NULL);
|
||||||
NtClose(hDesk);
|
NtClose(hDesk);
|
||||||
|
if(!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("Unable to reference thread desktop handle 0x%x\n", hDesk);
|
||||||
|
Win32Thread->Desktop = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Win32Thread->IsExiting = FALSE;
|
Win32Thread->IsExiting = FALSE;
|
||||||
IntDestroyCaret(Win32Thread);
|
IntDestroyCaret(Win32Thread);
|
||||||
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
Win32Thread->MessageQueue = MsqCreateMessageQueue(Thread);
|
||||||
|
|
Loading…
Reference in a new issue