Fix memory leak in NtUserMonitorFromRect when it return in one case.

svn path=/trunk/; revision=20420
This commit is contained in:
Magnus Olsen
2005-12-29 13:13:14 +00:00
parent f52b36d570
commit 181c0f4e30
+3 -1
View File
@@ -778,7 +778,7 @@ NtUserMonitorFromRect(
HMONITOR hMonitor = NULL;
RECT rect;
NTSTATUS status;
/* get rect */
status = MmCopyFromCaller(&rect, pRect, sizeof (RECT));
if (!NT_SUCCESS(status))
@@ -838,6 +838,8 @@ NtUserMonitorFromRect(
numMonitors, 0);
if (numMonitors <= 0)
{
ExFreePool(hMonitorList);
ExFreePool(rectList);
return (HMONITOR)NULL;
}