The IoFreeIrp routine releases a caller-allocated IRP from the caller’s IoCompletion routine.
VOID
IoFreeIrp(
IN PIRP Irp
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
This routine is the reciprocal to IoAllocateIrp or IoBuildAsynchronousFsdRequest. The released IRP must have been allocated by the caller.
This routine also releases an IRP allocated with IoMakeAssociatedIrp in which the caller set up its IoCompletion routine that returns STATUS_MORE_PROCESSING_REQUIRED for the associated IRP.
Callers of IoFreeIrp must be running at IRQL <= DISPATCH_LEVEL.
IoAllocateIrp, IoBuildAsynchronousFsdRequest, IoMakeAssociatedIrp, IoSetCompletionRoutine