[WDMAUD_KERNEL]
[reactos.git] / reactos / drivers / wdm / audio / legacy / wdmaud / control.c
index 3af87b8..d41b5da 100644 (file)
@@ -464,6 +464,13 @@ WdmAudReadWrite(
         return SetIrpIoStatus(Irp, Status, 0);
     }
 
+    /* check if mdl is locked */
+    if (Mdl->MdlFlags & MDL_PAGES_LOCKED)
+    {
+        /* unlock pages */
+        MmUnlockPages(Mdl);
+    }
+
     /* now free the mdl */
     IoFreeMdl(Mdl);