if (NT_SUCCESS(Status))
{
/* allocate resource buffer */
- Result = ExAllocatePool(PoolType, Size);
+ Result = AllocateItem(PoolType, Size);
if (Result)
{
/* copy resource */
if (Result)
{
/* free resource buffer in case of a failure */
- ExFreePool(Result);
+ FreeItem(Result);
}
}
/* done */
/* allocate image name buffer */
ImageName->MaximumLength = sizeof(ImagePath) + ImageLength;
- ImageName->Buffer = ExAllocatePool(PagedPool, ImageName->MaximumLength);
+ ImageName->Buffer = AllocateItem(PagedPool, ImageName->MaximumLength);
/* check for success */
if (!ImageName->Buffer)
if (!NT_SUCCESS(Status))
{
/* unexpected error */
- ExFreePool(ImageName->Buffer);
+ FreeItem(ImageName->Buffer);
return Status;
}
Status = KspQueryRegValue(RegKey, L"ResourceId", NULL, &ImageLength, ValueType);
/* allocate resource id buffer*/
- *ResourceId = (ULONG_PTR)ExAllocatePool(PagedPool, ImageLength);
+ *ResourceId = (ULONG_PTR)AllocateItem(PagedPool, ImageLength);
/* check for success */
if (!*ResourceId)
{
/* insufficient memory */
- ExFreePool(ImageName->Buffer);
+ FreeItem(ImageName->Buffer);
return STATUS_INSUFFICIENT_RESOURCES;
}
/* now query for resource id */
if (!NT_SUCCESS(Status))
{
/* unexpected error */
- ExFreePool(ImageName->Buffer);
- ExFreePool((PVOID)*ResourceId);
+ FreeItem(ImageName->Buffer);
+ FreeItem((PVOID)*ResourceId);
}
/* return result */
/* initialize subkey buffer */
SubKeyName.Length = 0;
SubKeyName.MaximumLength = Modules.MaximumLength + ModuleName->MaximumLength;
- SubKeyName.Buffer = ExAllocatePool(PagedPool, SubKeyName.MaximumLength);
+ SubKeyName.Buffer = AllocateItem(PagedPool, SubKeyName.MaximumLength);
/* check for success */
if (!SubKeyName.Buffer)
}
/* free subkey string */
- ExFreePool(SubKeyName.Buffer);
+ FreeItem(SubKeyName.Buffer);
/* close device key */
ZwClose(hKey);