summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/xhci.c
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2019-05-21 09:20:40 +0000
committerstsp <stsp@openbsd.org>2019-05-21 09:20:40 +0000
commite7faaa25d373f53d4de9b6dfb2d6be9bced3a9d6 (patch)
tree02413196fc3eae033c56d7fc45555f5f5422e891 /sys/dev/usb/xhci.c
parentFix free(9) with wrong pointer in sili(4) attach error path; CID 1480295 (diff)
downloadwireguard-openbsd-e7faaa25d373f53d4de9b6dfb2d6be9bced3a9d6.tar.xz
wireguard-openbsd-e7faaa25d373f53d4de9b6dfb2d6be9bced3a9d6.zip
Fix NULL check with wrong pointer in xhci_event_xfer_isoc(); CID 1480287
ok ratchov@
Diffstat (limited to 'sys/dev/usb/xhci.c')
-rw-r--r--sys/dev/usb/xhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 6bee1d5c097..375625096ab 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhci.c,v 1.103 2019/04/30 20:09:12 ratchov Exp $ */
+/* $OpenBSD: xhci.c,v 1.104 2019/05/21 09:20:40 stsp Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
@@ -935,7 +935,7 @@ xhci_event_xfer_isoc(struct usbd_xfer *xfer, struct xhci_pipe *xp,
if (xp->skip) {
while (1) {
skipxfer = SIMPLEQ_FIRST(&xp->pipe.queue);
- if (skipxfer == xfer || xfer == NULL)
+ if (skipxfer == xfer || skipxfer == NULL)
break;
DPRINTF(("%s: skipping %p\n", __func__, skipxfer));
skipxfer->status = USBD_NORMAL_COMPLETION;