Author: cwittich
Date: Sat Sep 20 08:44:56 2008
New Revision: 36347
URL:
http://svn.reactos.org/svn/reactos?rev=36347&view=rev
Log:
fix resource leaks
Modified:
trunk/rosapps/applications/magnify/magnifier.c
Modified: trunk/rosapps/applications/magnify/magnifier.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/magnify/magni…
==============================================================================
--- trunk/rosapps/applications/magnify/magnifier.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/magnify/magnifier.c [iso-8859-1] Sat Sep 20 08:44:56 2008
@@ -184,7 +184,8 @@
GetClientRect(hMainWnd, &appRect);
GetWindowRect(hDesktopWindow, &R);
- memset(&cinfo, 0, sizeof(cinfo));
+ ZeroMemory(&cinfo, sizeof(CURSORINFO));
+ ZeroMemory(&iinfo, sizeof(ICONINFO));
cinfo.cbSize = sizeof(cinfo);
GetCursorInfo(&cinfo);
GetIconInfo(cinfo.hCursor, &iinfo);
@@ -272,6 +273,10 @@
rop);
/* Cleanup.*/
+ if (iinfo.hbmMask)
+ DeleteObject(iinfo.hbmMask);
+ if (iinfo.hbmColor)
+ DeleteObject(iinfo.hbmColor);
SelectObject (HdcStrech, hOld);
DeleteObject (HbmpStrech);
DeleteDC (HdcStrech);