提交 7ce86aa1 编写于 作者: H Hans de Goede 提交者: Gerd Hoffmann

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

Signed-off-by: NHans de Goede <hdegoede@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册