Author: cgutman
Date: Fri Aug 12 09:39:05 2011
New Revision: 53191
URL:
http://svn.reactos.org/svn/reactos?rev=53191&view=rev
Log:
[USER32]
- Fix bitmap leaks in STATIC_SetIcon and get_icon_size
Modified:
trunk/reactos/dll/win32/user32/controls/static.c
trunk/reactos/dll/win32/user32/windows/cursoricon.c
Modified: trunk/reactos/dll/win32/user32/controls/static.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/static.c [iso-8859-1] Fri Aug 12 09:39:05
2011
@@ -208,6 +208,9 @@
SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
}
+
+ DeleteObject(info.hbmMask);
+ if (info.hbmColor) DeleteObject(info.hbmColor);
}
return prevIcon;
}
Modified: trunk/reactos/dll/win32/user32/windows/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Fri Aug 12 09:39:05
2011
@@ -2201,6 +2201,12 @@
{
size->cy /= 2;
}
+ else
+ {
+ DeleteObject(info.hbmColor);
+ }
+
+ DeleteObject(info.hbmMask);
return TRUE;
}