Skip to contentSkip to conversation

xhci: only free completed transfers

PATCH New Gerd Hoffmann 1 participant 1 message Jan 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xhci: only free completed transfers

Most callsites check already, one was missed.

Fixes 94b037f2a451b3dc855f9f2c346e5049a361bd55
---
 hw/usb/hcd-xhci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
hw/usb/hcd-xhci.c +3 -1
index 4acf0c6..e961564 100644
@@ -2198,7 +2198,9 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
             xhci_complete_packet(xfer);
         }
         assert(!xfer->running_retry);
-        xhci_ep_free_xfer(epctx->retry);
+        if (xfer->complete) {
+            xhci_ep_free_xfer(epctx->retry);
+        }
         epctx->retry = NULL;
     }
 
Signature · 1 line
1.8.3.1