[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 21 Dec 2012 22:40:05 +0000 (22:40 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 21 Dec 2012 22:40:05 +0000 (22:40 +0000)
Fix crash, when running out of paged pool. Found by r3ddr4g0n.

svn path=/trunk/; revision=57962

reactos/win32ss/gdi/ntgdi/gdiobj.c

index 4584ef3..f3365cb 100644 (file)
@@ -1237,6 +1237,11 @@ GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
     }
 
     pobj = GDIOBJ_AllocateObject(objt, cjSize, fl);
+    if (!pobj)
+    {
+        return NULL;
+    }
+
     if (!GDIOBJ_hInsertObject(pobj, GDI_OBJ_HMGR_POWNED))
     {
         GDIOBJ_vFreeObject(pobj);