diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2008-05-18 17:15:42 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2008-05-18 17:15:42 +0000 |
commit | a14178dacc62db96f134e2adc21d8da480366d0e (patch) | |
tree | 300270e52964e6a66d0e1da2dfe6d6aad9596ed0 /sys/dev | |
parent | 821c30135f708c20a8886c89fe5c173b96ab2f93 (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.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/umass.c | 6 |
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() */ |