diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-24 04:13:17 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-24 04:13:17 +0000 |
commit | b67ef39bc4027657644ed3574ec3298e45389f59 (patch) | |
tree | ef4a43abd55a551e7bad30f308d217c401083f75 /sys/scsi | |
parent | 5455500965bd9865310381d0ce0a530fb252293c (diff) |
Check malloc() return value, from tedu@heorot.stanford.edu
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsiconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index ee0cc9fbdaa..2aa63670e2a 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.55 2001/01/22 19:11:48 csapuntz Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.56 2001/05/24 04:13:16 angelos Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -740,6 +740,8 @@ scsi_probedev(scsi, target, lun) return; sc_link = malloc(sizeof(*sc_link), M_DEVBUF, M_NOWAIT); + if (sc_link == NULL) + return; *sc_link = *scsi->adapter_link; sc_link->target = target; sc_link->lun = lun; |