mirror of https://gitee.com/openkylin/qemu.git
ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e983395d30
commit
7ce86aa1aa
|
@ -1598,7 +1598,7 @@ static int ehci_process_itd(EHCIState *ehci,
|
|||
|
||||
dev = ehci_find_device(ehci, devaddr);
|
||||
ep = usb_ep_get(dev, pid, endp);
|
||||
if (ep->type == USB_ENDPOINT_XFER_ISOC) {
|
||||
if (ep && ep->type == USB_ENDPOINT_XFER_ISOC) {
|
||||
usb_packet_setup(&ehci->ipacket, pid, ep, addr);
|
||||
usb_packet_map(&ehci->ipacket, &ehci->isgl);
|
||||
ret = usb_handle_packet(dev, &ehci->ipacket);
|
||||
|
|
Loading…
Reference in New Issue