From 682249c035fd084531e57af27220182d4e7cae52 Mon Sep 17 00:00:00 2001 From: "Matthew N. Dodd" Date: Wed, 13 Apr 2005 17:36:18 +0000 Subject: [PATCH] Add KASSERT() to warn against NULL deref. Submitted by: sam (Coverity) --- sys/dev/ida/ida.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c index 010dbfd11cf..bfb2c03db03 100644 --- a/sys/dev/ida/ida.c +++ b/sys/dev/ida/ida.c @@ -579,6 +579,7 @@ ida_done(struct ida_softc *ida, struct ida_qcb *qcb) if (ida->flags & IDA_INTERRUPTS) wakeup(qcb); } else { + KASSERT(qcb->buf != NULL, ("ida_done(): qcb->buf is NULL!")); if (error) qcb->buf->bio_flags |= BIO_ERROR; idad_intr(qcb->buf);