https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c098ee8d2de3c771b934…
commit 8c098ee8d2de3c771b934f02cb2f1e0140a398d1
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Fri Jul 30 15:58:22 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Aug 3 23:13:19 2021 +0200
[WIN32K:NTUSER] Make sure to hold User Global Lock before unmapping desktop heap
---
win32ss/user/ntuser/desktop.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/desktop.c b/win32ss/user/ntuser/desktop.c
index e9f61c3742e..eae7a8b2ef2 100644
--- a/win32ss/user/ntuser/desktop.c
+++ b/win32ss/user/ntuser/desktop.c
@@ -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;
}