aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-08-30 15:00:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-11 07:42:59 +0200
commit0e7953525f52aa6c098dc0c1ce0b4a80ce82da45 (patch)
tree2cb09e3e3062878ca982182e8afefec14dd5573e
parent522079dd4461c38b9a88bf31a65ea038c5b2be45 (diff)
ehci: Properly cleanup packets on cancel
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--hw/usb/hcd-ehci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 78a248f08..4fe85c8ef 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -747,6 +747,8 @@ static void ehci_free_packet(EHCIPacket *p)
trace_usb_ehci_packet_action(p->queue, p, "free");
if (p->async == EHCI_ASYNC_INFLIGHT) {
usb_cancel_packet(&p->packet);
+ usb_packet_unmap(&p->packet, &p->sgl);
+ qemu_sglist_destroy(&p->sgl);
}
QTAILQ_REMOVE(&p->queue->packets, p, next);
usb_packet_cleanup(&p->packet);