[USBSTOR]
[reactos.git] / reactos / drivers / usb / usbstor / scsi.c
index 122b890..ee5bfba 100644 (file)
@@ -726,6 +726,8 @@ USBSTOR_SendRequest(
                             //
                             // failed to allocate MDL
                             //
+                            FreeItem(Context->cbw);
+                            FreeItem(Context);
                             return STATUS_INSUFFICIENT_RESOURCES;
                         }
 
@@ -755,6 +757,8 @@ USBSTOR_SendRequest(
                     //
                     // failed to allocate MDL
                     //
+                    FreeItem(Context->cbw);
+                    FreeItem(Context);
                     return STATUS_INSUFFICIENT_RESOURCES;
                 }
 
@@ -775,6 +779,8 @@ USBSTOR_SendRequest(
                 //
                 // failed to allocate MDL
                 //
+                FreeItem(Context->cbw);
+                FreeItem(Context);
                 return STATUS_INSUFFICIENT_RESOURCES;
             }
 
@@ -1083,7 +1089,7 @@ USBSTOR_SendModeSense(
     // MODE_PARAMETER_BLOCK
     //
     //
-    UNIMPLEMENTED
+    UNIMPLEMENTED;
 
     //
     // send csw
@@ -1195,7 +1201,7 @@ USBSTOR_SendReadWrite(
     // sanity check
     //
     Temp = (Cmd.ContiguousLogicBlocksByte0 << 8 | Cmd.ContiguousLogicBlocksByte1);
-    ASSERT(NTOHL(Temp == BlockCount));
+    ASSERT(Temp == BlockCount);
 
     DPRINT("USBSTOR_SendReadWrite BlockAddress %x%x%x%x BlockCount %lu BlockLength %lu\n", Cmd.LogicalBlockByte0, Cmd.LogicalBlockByte1, Cmd.LogicalBlockByte2, Cmd.LogicalBlockByte3, BlockCount, PDODeviceExtension->BlockLength);