The IoFreeMdl routine releases a caller-allocated MDL.
VOID
IoFreeMdl(
IN PMDL Mdl
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
If a driver allocates an MDL to describe a buffer, it must explicitly release the MDL when operations on the buffer are done.
Callers of IoFreeMdl must be running at IRQL <= DISPATCH_LEVEL.