mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 22:18:13 +00:00
[VIDEOPRT] Use ExFreePoolWithTag() + Add some ASSERTs.
This commit is contained in:
parent
e930b868a0
commit
bf74f101c2
2 changed files with 8 additions and 6 deletions
|
@ -176,7 +176,7 @@ IntAgpReleasePhysical(
|
|||
}
|
||||
|
||||
/* Free resources */
|
||||
ExFreePool(AgpMapping);
|
||||
ExFreePoolWithTag(AgpMapping, TAG_VIDEO_PORT);
|
||||
}
|
||||
|
||||
PHYSICAL_ADDRESS NTAPI
|
||||
|
@ -230,7 +230,7 @@ IntAgpReservePhysical(
|
|||
&AgpMapping->PhysicalAddress);
|
||||
if (!NT_SUCCESS(Status) || AgpMapping->MapHandle == NULL)
|
||||
{
|
||||
ExFreePool(AgpMapping);
|
||||
ExFreePoolWithTag(AgpMapping, TAG_VIDEO_PORT);
|
||||
WARN_(VIDEOPRT, "Warning: AgpBusInterface->ReserveMemory failed (Status = 0x%x)\n",
|
||||
Status);
|
||||
return ZeroAddress;
|
||||
|
@ -412,7 +412,7 @@ IntAgpReleaseVirtual(
|
|||
}
|
||||
|
||||
/* Free resources */
|
||||
ExFreePool(VirtualMapping);
|
||||
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||
}
|
||||
|
||||
PVOID NTAPI
|
||||
|
@ -447,7 +447,7 @@ IntAgpReserveVirtual(
|
|||
if (ProcessHandle == NULL)
|
||||
{
|
||||
/* FIXME: What to do in this case? */
|
||||
ExFreePool(VirtualMapping);
|
||||
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||
return NULL;
|
||||
}
|
||||
else /* ProcessHandle != NULL */
|
||||
|
@ -459,7 +459,7 @@ IntAgpReserveVirtual(
|
|||
MEM_RESERVE, PAGE_NOACCESS);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(VirtualMapping);
|
||||
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||
WARN_(VIDEOPRT, "ZwAllocateVirtualMemory() failed: Status = 0x%x\n", Status);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ VideoPortDeleteEvent(
|
|||
if (!Event->pKEvent) return ERROR_INVALID_PARAMETER;
|
||||
|
||||
/* Free storage */
|
||||
ExFreePool(Event);
|
||||
ExFreePoolWithTag(Event, TAG_VIDEO_PORT);
|
||||
|
||||
/* Indicate success */
|
||||
return NO_ERROR;
|
||||
|
@ -93,6 +93,7 @@ VideoPortSetEvent(
|
|||
_In_ PVOID HwDeviceExtension,
|
||||
_In_ PEVENT Event)
|
||||
{
|
||||
ASSERT(Event);
|
||||
return KeSetEvent(Event->pKEvent, IO_NO_INCREMENT, FALSE);
|
||||
}
|
||||
|
||||
|
@ -105,6 +106,7 @@ VideoPortClearEvent(
|
|||
_In_ PVOID HwDeviceExtension,
|
||||
_In_ PEVENT Event)
|
||||
{
|
||||
ASSERT(Event);
|
||||
KeClearEvent(Event->pKEvent);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue