[ros-diffs] [fireball] 18096: Christoph von Wittich: fix for bug 824 ("memory leak in welcome").

fireball at svn.reactos.com fireball at svn.reactos.com
Mon Sep 26 18:13:58 CEST 2005


Christoph von Wittich: fix for bug 824 ("memory leak in welcome").
-LoadBitmap without DeleteObject
-SelectObject is used with wrong DC
Modified: trunk/reactos/subsys/system/welcome/welcome.c
  _____  

Modified: trunk/reactos/subsys/system/welcome/welcome.c
--- trunk/reactos/subsys/system/welcome/welcome.c	2005-09-26
16:07:23 UTC (rev 18095)
+++ trunk/reactos/subsys/system/welcome/welcome.c	2005-09-26
16:13:50 UTC (rev 18096)
@@ -143,6 +143,7 @@

       ulInnerWidth = BitmapInfo.bmWidth;
       ulInnerHeight = (ulInnerWidth * 3) / 4;
       ulTitleHeight = BitmapInfo.bmHeight + 3;
+      DeleteObject(hTitleBitmap);
     }
   ulInnerHeight -= GetSystemMetrics(SM_CYCAPTION);
 
@@ -485,7 +486,7 @@
 	 rcPanel->right - rcPanel->left,
 	 rcPanel->bottom - 3,
 	 hdcMem, 0, 0, SRCCOPY);
-  SelectObject(hdc, hOldBitmap);
+  SelectObject(hdcMem, hOldBitmap);
 
   /* Dark blue line */
   hOldBrush = SelectObject(hdc, hbrDarkBlue);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050926/6133f777/attachment.html


More information about the Ros-diffs mailing list