summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2008-05-18 17:15:42 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2008-05-18 17:15:42 +0000
commita14178dacc62db96f134e2adc21d8da480366d0e (patch)
tree300270e52964e6a66d0e1da2dfe6d6aad9596ed0
parent821c30135f708c20a8886c89fe5c173b96ab2f93 (diff)
avoid leaking pipes by not zeroing the pipe after aborting it, so
umass_disco() have a chance to free'em later. from nathanw@netbsd. miod@ ok.
-rw-r--r--sys/dev/usb/umass.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index e4ed27bbd40..283ba9fd296 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass.c,v 1.55 2008/02/03 00:36:29 krw Exp $ */
+/* $OpenBSD: umass.c,v 1.56 2008/05/18 17:15:41 fgsch Exp $ */
/* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */
/*
@@ -644,10 +644,8 @@ umass_detach(struct device *self, int flags)
/* Abort the pipes to wake up any waiting processes. */
for (i = 0 ; i < UMASS_NEP ; i++) {
- if (sc->sc_pipe[i] != NULL) {
+ if (sc->sc_pipe[i] != NULL)
usbd_abort_pipe(sc->sc_pipe[i]);
- sc->sc_pipe[i] = NULL;
- }
}
/* Do we really need reference counting? Perhaps in ioctl() */