- ObpCreateDosDevicesDirectory: Check that allocation succeeded before dereference
authorStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 11 Sep 2009 22:31:46 +0000 (22:31 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Fri, 11 Sep 2009 22:31:46 +0000 (22:31 +0000)
svn path=/trunk/; revision=43031

reactos/ntoskrnl/ob/obname.c

index c04460e..c97d4ce 100644 (file)
@@ -101,6 +101,7 @@ ObpCreateDosDevicesDirectory(VOID)
     ObSystemDeviceMap = ExAllocatePoolWithTag(NonPagedPool,
                                               sizeof(*ObSystemDeviceMap),
                                               'mDbO');
+    if (!ObSystemDeviceMap) return STATUS_INSUFFICIENT_RESOURCES;
     RtlZeroMemory(ObSystemDeviceMap, sizeof(*ObSystemDeviceMap));
 
     /* Return status */