[WIN32K:NTUSER] Make sure to hold User Global Lock before unmapping desktop heap

This commit is contained in:
Jérôme Gardou 2021-07-30 15:58:22 +02:00 committed by Jérôme Gardou
parent 6ec0420dc6
commit 8c098ee8d2

View file

@ -215,6 +215,7 @@ NTAPI
IntDesktopObjectClose(
_In_ PVOID Parameters)
{
NTSTATUS Ret;
PWIN32_CLOSEMETHOD_PARAMETERS CloseParameters = Parameters;
PPROCESSINFO ppi = PsGetProcessWin32Process(CloseParameters->Process);
if (ppi == NULL)
@ -224,7 +225,10 @@ IntDesktopObjectClose(
return STATUS_SUCCESS;
}
return IntUnmapDesktopView((PDESKTOP)CloseParameters->Object);
UserEnterExclusive();
Ret = IntUnmapDesktopView((PDESKTOP)CloseParameters->Object);
UserLeave();
return Ret;
}