mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[NTUSER] Address memory leak in co_WinPosSetWindowPos(). (#7284)
CORE-19723
This commit is contained in:
parent
163f3407c8
commit
633d2e6d0c
1 changed files with 21 additions and 16 deletions
|
@ -2071,11 +2071,6 @@ co_WinPosSetWindowPos(
|
|||
RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
|
||||
}
|
||||
|
||||
if (VisBeforeJustClient != NULL)
|
||||
{
|
||||
REGION_Delete(VisBeforeJustClient);
|
||||
}
|
||||
|
||||
/* Now use in copying bits which are in the update region. */
|
||||
if (Window->hrgnUpdate != NULL)
|
||||
{
|
||||
|
@ -2223,11 +2218,6 @@ co_WinPosSetWindowPos(
|
|||
}
|
||||
}
|
||||
|
||||
if (CopyRgn != NULL)
|
||||
{
|
||||
REGION_Delete(CopyRgn);
|
||||
}
|
||||
|
||||
/* Expose what was covered before but not covered anymore */
|
||||
if (VisBefore != NULL)
|
||||
{
|
||||
|
@ -2248,12 +2238,6 @@ co_WinPosSetWindowPos(
|
|||
}
|
||||
REGION_Delete(ExposedRgn);
|
||||
}
|
||||
REGION_Delete(VisBefore);
|
||||
}
|
||||
|
||||
if (VisAfter != NULL)
|
||||
{
|
||||
REGION_Delete(VisAfter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2301,6 +2285,27 @@ co_WinPosSetWindowPos(
|
|||
WinPos.flags |= SWP_NOZORDER|SWP_NOREDRAW;
|
||||
}
|
||||
|
||||
if (VisBefore != NULL)
|
||||
{
|
||||
REGION_Delete(VisBefore);
|
||||
VisBefore = NULL;
|
||||
}
|
||||
if (VisBeforeJustClient != NULL)
|
||||
{
|
||||
REGION_Delete(VisBeforeJustClient);
|
||||
VisBeforeJustClient = NULL;
|
||||
}
|
||||
if (VisAfter != NULL)
|
||||
{
|
||||
REGION_Delete(VisAfter);
|
||||
VisAfter = NULL;
|
||||
}
|
||||
if (CopyRgn != NULL)
|
||||
{
|
||||
REGION_Delete(CopyRgn);
|
||||
CopyRgn = NULL;
|
||||
}
|
||||
|
||||
if(!(flags & SWP_DEFERERASE))
|
||||
{
|
||||
/* erase parent when hiding or resizing child */
|
||||
|
|
Loading…
Reference in a new issue