Fix memory leak in NtUserMonitorFromRect when it return in one case.
Modified: trunk/reactos/subsys/win32k/ntuser/monitor.c
_____
Modified: trunk/reactos/subsys/win32k/ntuser/monitor.c
--- trunk/reactos/subsys/win32k/ntuser/monitor.c 2005-12-29
12:40:31 UTC (rev 20419)
+++ trunk/reactos/subsys/win32k/ntuser/monitor.c 2005-12-29
13:13:14 UTC (rev 20420)
@@ -778,7 +778,7 @@
HMONITOR hMonitor = NULL;
RECT rect;
NTSTATUS status;
-
+
/* get rect */
status = MmCopyFromCaller(&rect, pRect, sizeof (RECT));
if (!NT_SUCCESS(status))
@@ -838,6 +838,8 @@
numMonitors, 0);
if (numMonitors <= 0)
{
+ ExFreePool(hMonitorList);
+ ExFreePool(rectList);
return (HMONITOR)NULL;
}