[haiku-commits] r42701 - haiku/trunk/src/add-ons/kernel/busses/usb

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 30 Aug 2011 22:46:07 +0200 (CEST)

Author: korli
Date: 2011-08-30 22:46:07 +0200 (Tue, 30 Aug 2011)
New Revision: 42701
Changeset: https://dev.haiku-os.org/changeset/42701

Modified:
   haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp
Log:
Read the previous descriptor pointer before freeing transfer and transfer 
descriptors.


Modified: haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp  2011-08-30 13:29:10 UTC 
(rev 42700)
+++ haiku/trunk/src/add-ons/kernel/busses/usb/ehci.cpp  2011-08-30 20:46:07 UTC 
(rev 42701)
@@ -1758,6 +1758,8 @@
 
                                        transfer->transfer->Finished(B_OK, 
actualLength);
 
+                                       itd = itd->prev;
+
                                        for (uint32 i = 0; i <= 
transfer->last_to_process; i++)
                                                
FreeDescriptor(transfer->descriptors[i]);
 
@@ -1771,8 +1773,8 @@
                                        transferDone = true;
                                } else {
                                        TRACE("FinishIsochronousTransfers not 
end of transfer\n");
+                                       itd = itd->prev;
                                }
-                               itd = itd->prev;
                        }
 
                        UnlockIsochronous();


Other related posts:

  • » [haiku-commits] r42701 - haiku/trunk/src/add-ons/kernel/busses/usb - korli