[ros-diffs] [fireball] 44029: - Check if pBitsLock is NULL in SURFACE_Cleanup before freeing it. This may happen only in a low-memory condition failure branch in create surface code. Spotted by Kamil Hornicek.

fireball at svn.reactos.org fireball at svn.reactos.org
Sun Nov 8 21:14:15 CET 2009


Author: fireball
Date: Sun Nov  8 21:14:15 2009
New Revision: 44029

URL: http://svn.reactos.org/svn/reactos?rev=44029&view=rev
Log:
- Check if pBitsLock is NULL in SURFACE_Cleanup before freeing it. This may happen only in a low-memory condition failure branch in create surface code. Spotted by Kamil Hornicek.

Modified:
    branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c

Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c
URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c?rev=44029&r1=44028&r2=44029&view=diff
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/gre/surfobj.c [iso-8859-1] Sun Nov  8 21:14:15 2009
@@ -247,7 +247,8 @@
         GDIOBJ_FreeObjByHandle(pSurf->hDIBPalette, GDI_OBJECT_TYPE_PALETTE);
 
     /* Free bitslock storage */
-    ExFreePoolWithTag(pSurf->pBitsLock, TAG_SURFOBJ);
+    if (pSurf->pBitsLock)
+        ExFreePoolWithTag(pSurf->pBitsLock, TAG_SURFOBJ);
 
     return TRUE;
 }




More information about the Ros-diffs mailing list