summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1998-09-14 01:55:53 +0000
committerJason Downs <downsj@cvs.openbsd.org>1998-09-14 01:55:53 +0000
commit62d203b1aea6a5195937032bb27c074afa7e2f7c (patch)
treee2f856852cdfd9b11b6860ec2f0b6ce7aeb84d47
parent53218c15edcfe41c06028f1a17a68693bb6bc556 (diff)
avoid NULL deref for now
-rw-r--r--sys/dev/isa/wdc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/isa/wdc.c b/sys/dev/isa/wdc.c
index 886d87ddc67..d530e3d3104 100644
--- a/sys/dev/isa/wdc.c
+++ b/sys/dev/isa/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.33 1998/08/08 23:01:06 downsj Exp $ */
+/* $OpenBSD: wdc.c,v 1.34 1998/09/14 01:55:52 downsj Exp $ */
/* $NetBSD: wd.c,v 1.150 1996/05/12 23:54:03 mycroft Exp $ */
/*
@@ -1590,6 +1590,12 @@ wdcintr(arg)
wdc->sc_flags &= ~WDCF_IRQ_WAIT;
xfer = wdc->sc_xfer.tqh_first;
+ if (xfer == NULL) {
+#ifdef ATAPI_DEBUG
+ printf("wdcintr: null xfer\n");
+#endif
+ return 0;
+ }
#if NATAPIBUS > 0 && NWD > 0
if (xfer->c_flags & C_ATAPI) {
(void)wdc_atapi_intr(wdc, xfer);