Skip to content

Commit

Permalink
Remove deprecated API usage in DV-FailDriver-WDM sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
NateD-MSFT committed Jun 2, 2021
1 parent 10037b5 commit e3b7ea5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tools/dv/samples/DV-FailDriver-WDM/defect_toastmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ Return Value:
// Allocate memory for the deviceinfo
//

list = ExAllocatePoolWithTag(PagedPool,sizeof(DEVICE_INFO),DRIVER_TAG);
list = ExAllocatePool2(POOL_FLAG_PAGED, sizeof(DEVICE_INFO), DRIVER_TAG);
if (list == NULL)
{
goto Error;
Expand All @@ -841,10 +841,10 @@ Return Value:
list->SymbolicLink.MaximumLength = symbolicLinkName->Length +
sizeof(UNICODE_NULL);
list->SymbolicLink.Length = symbolicLinkName->Length;
list->SymbolicLink.Buffer = ExAllocatePoolWithTag (
PagedPool,
list->SymbolicLink.MaximumLength,
DRIVER_TAG);
list->SymbolicLink.Buffer = ExAllocatePool2(
POOL_FLAG_PAGED,
list->SymbolicLink.MaximumLength,
DRIVER_TAG);
if (list->SymbolicLink.Buffer == NULL)
{
goto Error;
Expand Down
4 changes: 2 additions & 2 deletions tools/dv/samples/DV-FailDriver-WDM/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ Return Value:
}
}

valueInfo = ExAllocatePoolWithTag (NonPagedPool, resultLength,
DRIVER_TAG);
valueInfo = ExAllocatePool2(POOL_FLAG_NON_PAGED, resultLength,
DRIVER_TAG);
if (NULL == valueInfo) {
status = STATUS_INSUFFICIENT_RESOURCES;
goto Error;
Expand Down

0 comments on commit e3b7ea5

Please sign in to comment.