Commit 7ce86aa1 authored by Hans de Goede's avatar Hans de Goede Committed by Gerd Hoffmann
Browse files

ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent e983395d
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment