Author: hbelusca
Date: Fri Mar 14 23:12:10 2014
New Revision: 62498
URL:
http://svn.reactos.org/svn/reactos?rev=62498&view=rev
Log:
[CARDS]
Fix GDI leak.
Patch by mudhead.
CORE-7854 #resolve #comment Fixed in revision 62498, thanks ;)
Modified:
trunk/reactos/dll/win32/cards/cards.c
Modified: trunk/reactos/dll/win32/cards/cards.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/cards.c?re…
==============================================================================
--- trunk/reactos/dll/win32/cards/cards.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cards/cards.c [iso-8859-1] Fri Mar 14 23:12:10 2014
@@ -169,13 +169,15 @@
if (type == ectEMPTY || type == ectERASE)
{
POINT pPoint;
- HBRUSH hBrush;
+ HBRUSH hBrush, hOldBrush;
hBrush = CreateSolidBrush(color);
GetDCOrgEx(hdc, &pPoint);
SetBrushOrgEx(hdc, pPoint.x, pPoint.y, 0);
- SelectObject(hdc, hBrush);
+ hOldBrush = SelectObject(hdc, hBrush);
PatBlt(hdc, x, y, dx, dy, PATCOPY);
+ SelectObject(hdc, hOldBrush);
+ DeleteObject(hBrush);
}
if (type != ectERASE)
{