Commit 66a44e3c authored by Francis Beaudet's avatar Francis Beaudet Committed by Alexandre Julliard

Fixed a memory leak.

parent 4d550350
......@@ -798,7 +798,10 @@ static void TAB_DrawItem(
* Background color.
*/
if (!(lStyle & TCS_OWNERDRAWFIXED))
{
DeleteObject(hbr);
hbr = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
}
/*
* Erase the background.
......@@ -847,6 +850,7 @@ static void TAB_DrawItem(
/*
* Background color.
*/
DeleteObject(hbr);
hbr = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
/*
......@@ -961,6 +965,8 @@ static void TAB_DrawItem(
*/
SetBkMode(hdc, oldBkMode);
SelectObject(hdc, holdPen);
DeleteObject(hfocusPen);
DeleteObject(hbr);
}
}
......@@ -1097,6 +1103,8 @@ static LRESULT TAB_EraseBackground(
if (givenDC==0)
ReleaseDC(hwnd, hdc);
DeleteObject(brush);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment