summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann2017-01-30 16:36:44 +0100
committerGerd Hoffmann2017-02-06 10:23:17 +0100
commitf94d18d6c6df388fde196d3ab252f57e33843a8b (patch)
tree6177560ed7fcca01a06de79641699912f5f4fd96
parentusb: accept usb3 control requests (diff)
downloadqemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.tar.gz
qemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.tar.xz
qemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.zip
xhci: only free completed transfers
Most callsites check already, one was missed. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9f2c346e5049a361bd55 Reported-by: Fabian Lesniak <fabian@lesniak-it.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1485790607-31399-2-git-send-email-kraxel@redhat.com
-rw-r--r--hw/usb/hcd-xhci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index f8106789d8..6a1d3dc7d0 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -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;
}