[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/18] hw: ehci: destroy sglist in error path
From: |
Gerd Hoffmann |
Subject: |
[PULL 02/18] hw: ehci: destroy sglist in error path |
Date: |
Mon, 31 Aug 2020 10:32:45 +0200 |
From: Li Qiang <liq3ea@163.com>
This may cause resource leak.
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20200812161712.29361-1-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ehci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 1495e8f7fab1..58cceacbf83a 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1445,6 +1445,7 @@ static int ehci_process_itd(EHCIState *ehci,
dev = ehci_find_device(ehci, devaddr);
if (dev == NULL) {
ehci_trace_guest_bug(ehci, "no device found");
+ qemu_sglist_destroy(&ehci->isgl);
return -1;
}
pid = dir ? USB_TOKEN_IN : USB_TOKEN_OUT;
--
2.27.0
- [PULL 00/18] Usb 20200831 patches, Gerd Hoffmann, 2020/08/31
- [PULL 04/18] ehci: drop pointless warn_report for guest bugs., Gerd Hoffmann, 2020/08/31
- [PULL 02/18] hw: ehci: destroy sglist in error path,
Gerd Hoffmann <=
- [PULL 03/18] hw: ehci: check return value of 'usb_packet_map', Gerd Hoffmann, 2020/08/31
- [PULL 08/18] hw/usb: Add U2F key base class implementation, Gerd Hoffmann, 2020/08/31
- [PULL 07/18] hw/usb: Add U2F key base class, Gerd Hoffmann, 2020/08/31
- [PULL 17/18] usb-host: workaround libusb bug, Gerd Hoffmann, 2020/08/31
- [PULL 16/18] hw/usb: Add U2F device autoscan to passthru mode, Gerd Hoffmann, 2020/08/31
- [PULL 18/18] usb: fix setup_len init (CVE-2020-14364), Gerd Hoffmann, 2020/08/31
- [PULL 10/18] hw/usb: Add U2F key emulated mode, Gerd Hoffmann, 2020/08/31
- [PULL 01/18] hw: xhci: check return value of 'usb_packet_map', Gerd Hoffmann, 2020/08/31
- [PULL 06/18] docs: Add USB U2F key device documentation, Gerd Hoffmann, 2020/08/31
- [PULL 09/18] hw/usb: Add U2F key passthru mode, Gerd Hoffmann, 2020/08/31