mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 00:40:31 +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 */
|
/* Free resources */
|
||||||
ExFreePool(AgpMapping);
|
ExFreePoolWithTag(AgpMapping, TAG_VIDEO_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
PHYSICAL_ADDRESS NTAPI
|
PHYSICAL_ADDRESS NTAPI
|
||||||
|
@ -230,7 +230,7 @@ IntAgpReservePhysical(
|
||||||
&AgpMapping->PhysicalAddress);
|
&AgpMapping->PhysicalAddress);
|
||||||
if (!NT_SUCCESS(Status) || AgpMapping->MapHandle == NULL)
|
if (!NT_SUCCESS(Status) || AgpMapping->MapHandle == NULL)
|
||||||
{
|
{
|
||||||
ExFreePool(AgpMapping);
|
ExFreePoolWithTag(AgpMapping, TAG_VIDEO_PORT);
|
||||||
WARN_(VIDEOPRT, "Warning: AgpBusInterface->ReserveMemory failed (Status = 0x%x)\n",
|
WARN_(VIDEOPRT, "Warning: AgpBusInterface->ReserveMemory failed (Status = 0x%x)\n",
|
||||||
Status);
|
Status);
|
||||||
return ZeroAddress;
|
return ZeroAddress;
|
||||||
|
@ -412,7 +412,7 @@ IntAgpReleaseVirtual(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free resources */
|
/* Free resources */
|
||||||
ExFreePool(VirtualMapping);
|
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
PVOID NTAPI
|
PVOID NTAPI
|
||||||
|
@ -447,7 +447,7 @@ IntAgpReserveVirtual(
|
||||||
if (ProcessHandle == NULL)
|
if (ProcessHandle == NULL)
|
||||||
{
|
{
|
||||||
/* FIXME: What to do in this case? */
|
/* FIXME: What to do in this case? */
|
||||||
ExFreePool(VirtualMapping);
|
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else /* ProcessHandle != NULL */
|
else /* ProcessHandle != NULL */
|
||||||
|
@ -459,7 +459,7 @@ IntAgpReserveVirtual(
|
||||||
MEM_RESERVE, PAGE_NOACCESS);
|
MEM_RESERVE, PAGE_NOACCESS);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool(VirtualMapping);
|
ExFreePoolWithTag(VirtualMapping, TAG_VIDEO_PORT);
|
||||||
WARN_(VIDEOPRT, "ZwAllocateVirtualMemory() failed: Status = 0x%x\n", Status);
|
WARN_(VIDEOPRT, "ZwAllocateVirtualMemory() failed: Status = 0x%x\n", Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ VideoPortDeleteEvent(
|
||||||
if (!Event->pKEvent) return ERROR_INVALID_PARAMETER;
|
if (!Event->pKEvent) return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* Free storage */
|
/* Free storage */
|
||||||
ExFreePool(Event);
|
ExFreePoolWithTag(Event, TAG_VIDEO_PORT);
|
||||||
|
|
||||||
/* Indicate success */
|
/* Indicate success */
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
|
@ -93,6 +93,7 @@ VideoPortSetEvent(
|
||||||
_In_ PVOID HwDeviceExtension,
|
_In_ PVOID HwDeviceExtension,
|
||||||
_In_ PEVENT Event)
|
_In_ PEVENT Event)
|
||||||
{
|
{
|
||||||
|
ASSERT(Event);
|
||||||
return KeSetEvent(Event->pKEvent, IO_NO_INCREMENT, FALSE);
|
return KeSetEvent(Event->pKEvent, IO_NO_INCREMENT, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +106,7 @@ VideoPortClearEvent(
|
||||||
_In_ PVOID HwDeviceExtension,
|
_In_ PVOID HwDeviceExtension,
|
||||||
_In_ PEVENT Event)
|
_In_ PEVENT Event)
|
||||||
{
|
{
|
||||||
|
ASSERT(Event);
|
||||||
KeClearEvent(Event->pKEvent);
|
KeClearEvent(Event->pKEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue