aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-01-30 16:36:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-02-06 10:23:17 +0100
commitf94d18d6c6df388fde196d3ab252f57e33843a8b (patch)
tree6177560ed7fcca01a06de79641699912f5f4fd96 /hw
parent811ad5d8f1d3f35240043fe880d34dce6f2097a3 (diff)
downloadqemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.zip
qemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.tar.gz
qemu-f94d18d6c6df388fde196d3ab252f57e33843a8b.tar.bz2
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
Diffstat (limited to 'hw')
-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 f810678..6a1d3dc 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;
}