mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
free work items after processing them
svn path=/trunk/; revision=14502
This commit is contained in:
parent
47632d3088
commit
2177dfcfd2
|
@ -125,8 +125,11 @@ SerialReadWorkItem(
|
|||
Irp = WorkItemData->Irp;
|
||||
|
||||
ReadBytes(DeviceObject, Irp, WorkItemData);
|
||||
ExFreePoolWithTag(pWorkItemData, SERIAL_TAG);
|
||||
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
||||
IoFreeWorkItem(WorkItemData->IoWorkItem);
|
||||
ExFreePoolWithTag(pWorkItemData, SERIAL_TAG);
|
||||
}
|
||||
|
||||
NTSTATUS STDCALL
|
||||
|
@ -215,7 +218,8 @@ SerialRead(
|
|||
WorkItem = IoAllocateWorkItem(DeviceObject);
|
||||
if (WorkItem)
|
||||
{
|
||||
IoQueueWorkItem(WorkItem, SerialReadWorkItem, DelayedWorkQueue, WorkItemData);
|
||||
WorkItemData->IoWorkItem = WorkItem;
|
||||
IoQueueWorkItem(WorkItem, SerialReadWorkItem, DelayedWorkQueue, WorkItemData);
|
||||
IoMarkIrpPending(Irp);
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ typedef struct _SERIAL_DEVICE_EXTENSION
|
|||
typedef struct _WORKITEM_DATA
|
||||
{
|
||||
PIRP Irp;
|
||||
PIO_WORKITEM IoWorkItem;
|
||||
|
||||
BOOLEAN UseIntervalTimeout;
|
||||
BOOLEAN UseTotalTimeout;
|
||||
|
|
Loading…
Reference in a new issue