From: Hans de Goede Date: Thu, 30 Aug 2012 13:00:33 +0000 (+0200) Subject: ehci: Properly cleanup packets on cancel X-Git-Tag: v1.2.1~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=307fea863ad31b6cd6ceb44d2585f610f33db938;p=thirdparty%2Fqemu.git ehci: Properly cleanup packets on cancel Signed-off-by: Hans de Goede (cherry picked from commit 0e7953525f52aa6c098dc0c1ce0b4a80ce82da45) Signed-off-by: Michael Roth --- diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 78a248f08b1..4fe85c8ef7a 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);