summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2017-09-05 18:34:08 +0000
committerjasper <jasper@openbsd.org>2017-09-05 18:34:08 +0000
commit02e484bfb96d2831005ca782db5fa3b009142bc1 (patch)
treee0569d10007a30879f13ba9c71988e41db4e713b
parentfork+exec model for pflogd(8); move pcap init to the re-exec'd privsep (diff)
downloadwireguard-openbsd-02e484bfb96d2831005ca782db5fa3b009142bc1.tar.xz
wireguard-openbsd-02e484bfb96d2831005ca782db5fa3b009142bc1.zip
explicitly clear the output pipe
ok mpi@
-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);
}