Size = FIELD_OFFSET(DEVICE_RELATIONS, Objects) + (sizeof (PDEVICE_OBJECT) * __max(Count, 1));
- Relations = ExAllocatePoolWithTag(PagedPool, Size, 'FIV');
+ Relations = __AllocatePoolWithTag(PagedPool, Size, 'FIV');
status = STATUS_NO_MEMORY;
if (Relations == NULL)
goto fail1;
- RtlZeroMemory(Relations, Size);
-
for (ListEntry = Fdo->Dx->ListEntry.Flink;
ListEntry != &Fdo->Dx->ListEntry;
ListEntry = ListEntry->Flink) {
if (StackLocation->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation)
goto done;
- Relations = ExAllocatePoolWithTag(PagedPool, sizeof (DEVICE_RELATIONS), 'FIV');
+ Relations = __AllocatePoolWithTag(PagedPool, sizeof (DEVICE_RELATIONS), 'FIV');
status = STATUS_NO_MEMORY;
if (Relations == NULL)
goto done;
- RtlZeroMemory(Relations, sizeof (DEVICE_RELATIONS));
-
Relations->Count = 1;
ObReferenceObject(__PdoGetDeviceObject(Pdo));
Relations->Objects[0] = __PdoGetDeviceObject(Pdo);
goto done;
}
- Buffer = ExAllocatePoolWithTag(PagedPool, MAXTEXTLEN, 'FIV');
+ Buffer = __AllocatePoolWithTag(PagedPool, MAXTEXTLEN, 'FIV');
status = STATUS_NO_MEMORY;
if (Buffer == NULL)
goto done;
- RtlZeroMemory(Buffer, MAXTEXTLEN);
-
Text.Buffer = Buffer;
Text.MaximumLength = MAXTEXTLEN;
Text.Length = 0;
goto done;
}
- Buffer = ExAllocatePoolWithTag(PagedPool, Id.MaximumLength, 'FIV');
+ Buffer = __AllocatePoolWithTag(PagedPool, Id.MaximumLength, 'FIV');
status = STATUS_NO_MEMORY;
if (Buffer == NULL)
goto done;
- RtlZeroMemory(Buffer, Id.MaximumLength);
-
Id.Buffer = Buffer;
Id.Length = 0;
UNREFERENCED_PARAMETER(Pdo);
- Info = ExAllocatePoolWithTag(PagedPool, sizeof (PNP_BUS_INFORMATION), 'FIV');
+ Info = __AllocatePoolWithTag(PagedPool, sizeof (PNP_BUS_INFORMATION), 'FIV');
status = STATUS_NO_MEMORY;
if (Info == NULL)
goto done;
- RtlZeroMemory(Info, sizeof (PNP_BUS_INFORMATION));
-
Info->BusTypeGuid = GUID_BUS_TYPE_INTERNAL;
Info->LegacyBusType = PNPBus;
Info->BusNumber = 0;
__analysis_assume(PoolType == NonPagedPool ||
PoolType == PagedPool);
+#if (_MSC_VER >= 1928) // VS 16.9 (EWDK 20344 or later)
+ Buffer = ExAllocatePoolUninitialized(PoolType, NumberOfBytes, Tag);
+#else
#pragma warning(suppress:28160) // annotation error
Buffer = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag);
+#endif
if (Buffer == NULL)
return NULL;