summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-02-03 20:53:32 +0000
committermpi <mpi@openbsd.org>2014-02-03 20:53:32 +0000
commit4d725ab1a36cdf6cf59b0db275e87e072c2ed3e7 (patch)
tree939ab1deb71deb85ad1da73967cd1f7a13f71d83
parentperl is actually VERY BAD at scraping captured variables until the end. (diff)
downloadwireguard-openbsd-4d725ab1a36cdf6cf59b0db275e87e072c2ed3e7.tar.xz
wireguard-openbsd-4d725ab1a36cdf6cf59b0db275e87e072c2ed3e7.zip
Fix a null dereference introduced when converting this driver to use
usbd_is_dying(). Found the hard way by sebastia@
-rw-r--r--sys/dev/usb/uftdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 823d555d0d9..50712bd81f1 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.69 2014/01/07 14:00:50 deraadt Exp $ */
+/* $OpenBSD: uftdi.c,v 1.70 2014/02/03 20:53:32 mpi Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -891,7 +891,7 @@ uftdi_attach(struct device *parent, struct device *self, void *aux)
bad:
DPRINTF(("uftdi_attach: ATTACH ERROR\n"));
- usbd_deactivate(sc->sc_udev);
+ usbd_deactivate(dev);
}
int