summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2017-09-05 18:34:09 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2017-09-05 18:34:09 +0000
commit1771ce65629e9fbcab01ef62b7aaecdaa286f71b (patch)
treea6cdc42584ebde92847e6c567d700569c3a90b31 /sys
parent7956596bdbb53c293c8310246ea77c84e1c47cbd (diff)
explicitly clear the output pipe
ok mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/urng.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/urng.c b/sys/dev/usb/urng.c
index f5236cdbbf8..b3421974f17 100644
--- a/sys/dev/usb/urng.c
+++ b/sys/dev/usb/urng.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urng.c,v 1.4 2017/08/30 22:12:19 abieber Exp $ */
+/* $OpenBSD: urng.c,v 1.5 2017/09/05 18:34:08 jasper Exp $ */
/*
* Copyright (c) 2017 Jasper Lievisse Adriaanse <jasper@openbsd.org>
@@ -212,8 +212,10 @@ urng_detach(struct device *self, int flags)
timeout_del(&sc->sc_timeout);
if (sc->sc_xfer)
usbd_free_xfer(sc->sc_xfer);
- if (sc->sc_outpipe != NULL)
+ if (sc->sc_outpipe != NULL) {
usbd_close_pipe(sc->sc_outpipe);
+ sc->sc_outpipe = NULL;
+ }
return (0);
}