ehci: Fix memory leak in handling of NAK-ed packets
authorHans de Goede <hdegoede@redhat.com>
Mon, 3 Sep 2012 09:01:13 +0000 (11:01 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Sep 2012 05:42:59 +0000 (07:42 +0200)
commitef5b234477df80700b128f561f5877a0688a70c8
tree4f77053051f522a2d8c0e42656adccdd1111d71f
parent3a8ca08e01ea4baafff2a513655008cdd00feebf
ehci: Fix memory leak in handling of NAK-ed packets

Currently each time we try to execute a NAK-ed packet we redo
ehci_init_transfer, and usb_packet_map, re-allocing (without freeing) the
sg list every time.

This patch fixes this, it does this by introducing another async state, so
that we also properly cleanup a NAK-ed packet on cancel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ehci.c