projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21bc315
)
hw: ehci: destroy sglist in error path
author
Li Qiang
<liq3ea@163.com>
Wed, 12 Aug 2020 16:17:12 +0000
(09:17 -0700)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Mon, 31 Aug 2020 06:10:47 +0000
(08:10 +0200)
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
patch
|
blob
|
history
diff --git
a/hw/usb/hcd-ehci.c
b/hw/usb/hcd-ehci.c
index 1495e8f7fab1552aa94cf0344d6ac2e3200aae8f..58cceacbf83a0810c8ff566f0127f3589576eb48 100644
(file)
--- 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;