summaryrefslogtreecommitdiff
path: root/sys/scsi/st.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-09-14 04:49:43 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-09-14 04:49:43 +0000
commit3e3a495f59b2e187373c037de092cb58c3ba82c8 (patch)
tree6c5311b17e48eeb589e4ae569772529ddde52938 /sys/scsi/st.c
parentf27778f03e1895835fb85a67ae60f1b4aff6f431 (diff)
dont leak an xs in ststart if its called while the device is dying.
pointed out by matthew@
Diffstat (limited to 'sys/scsi/st.c')
-rw-r--r--sys/scsi/st.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 3b5210a7c34..ac39c9c1949 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.111 2010/09/14 04:02:43 dlg Exp $ */
+/* $OpenBSD: st.c,v 1.112 2010/09/14 04:49:42 dlg Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -912,8 +912,10 @@ ststart(struct scsi_xfer *xs)
SC_DEBUG(sc_link, SDEV_DB2, ("ststart\n"));
- if (st->flags & ST_DYING)
+ if (st->flags & ST_DYING) {
+ scsi_xs_put(xs);
return;
+ }
/*
* if the device has been unmounted by the user