mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
Fix memory leak in NtUserMonitorFromRect when it return in one case.
svn path=/trunk/; revision=20420
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user