diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-07-09 19:24:43 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-07-09 19:24:43 +0000 |
commit | 667f77995df4ce8955190bab7034639af4976654 (patch) | |
tree | 55390af9c3a0c73bee8b4b1276a94593e60e596c /sys/dev/softraid.c | |
parent | d5ae0275dfbef31f521db90b1ed145e1b3be82dd (diff) |
Be sure we don't hit a NULL deref. Pointed out by
remco at d-compu dot dyndns dot org.
OK marco@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 458df7de334..39a357ba39f 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.161 2009/06/26 14:50:44 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.162 2009/07/09 19:24:42 mglocker Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1799,7 +1799,7 @@ sr_scsi_cmd(struct scsi_xfer *xs) return (SUCCESSFULLY_QUEUED); stuffup: - if (sd->sd_scsi_sense.error_code) { + if (sd && sd->sd_scsi_sense.error_code) { xs->error = XS_SENSE; bcopy(&sd->sd_scsi_sense, &xs->sense, sizeof(xs->sense)); bzero(&sd->sd_scsi_sense, sizeof(sd->sd_scsi_sense)); |