mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
DRIVER_RegisterDriver did not check for NULL pointer when it alloc memory.
svn path=/trunk/; revision=20418
This commit is contained in:
@@ -54,6 +54,13 @@ BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver)
|
||||
Driver->Name = ExAllocatePoolWithTag(PagedPool,
|
||||
(wcslen(Name) + 1) * sizeof(WCHAR),
|
||||
TAG_DRIVER);
|
||||
if (Driver->Name == NULL)
|
||||
{
|
||||
DPRINT1("Out of memory\n");
|
||||
ExFreePool(Driver);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wcscpy(Driver->Name, Name);
|
||||
Driver->Next = DriverList;
|
||||
DriverList = Driver;
|
||||
|
||||
Reference in New Issue
Block a user