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/win3…
==============================================================================
--- 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;
}