usb: Fix iovec memleak on combined-packet free

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Hans de Goede 2013-09-17 21:44:52 +02:00 committed by Gerd Hoffmann
parent 9adbaad318
commit 0ca6db4f3b

View File

@ -39,6 +39,7 @@ static void usb_combined_packet_remove(USBCombinedPacket *combined,
p->combined = NULL; p->combined = NULL;
QTAILQ_REMOVE(&combined->packets, p, combined_entry); QTAILQ_REMOVE(&combined->packets, p, combined_entry);
if (QTAILQ_EMPTY(&combined->packets)) { if (QTAILQ_EMPTY(&combined->packets)) {
qemu_iovec_destroy(&combined->iov);
g_free(combined); g_free(combined);
} }
} }