Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/raidframe Make sure we really get something back fro...
details: https://anonhg.NetBSD.org/src/rev/6ba67122afce
branches: trunk
changeset: 480136:6ba67122afce
user: oster <oster%NetBSD.org@localhost>
date: Wed Jan 05 04:15:30 2000 +0000
description:
Make sure we really get something back from RF_Malloc before we use it.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r ce6dd08a09d0 -r 6ba67122afce sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Wed Jan 05 03:02:41 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Wed Jan 05 04:15:30 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.37 2000/01/05 02:57:29 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.38 2000/01/05 04:15:30 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -1023,6 +1023,8 @@
}
RF_Malloc(rrcopy, sizeof(*rrcopy), (struct rf_recon_req *));
+ if (rrcopy == NULL)
+ return(ENOMEM);
rrcopy->raidPtr = (void *) raidPtrs[unit];
rrcopy->row = row;
@@ -1133,6 +1135,8 @@
/* make a copy of the recon request so that we don't rely on
* the user's buffer */
RF_Malloc(rrcopy, sizeof(*rrcopy), (struct rf_recon_req *));
+ if (rrcopy == NULL)
+ return(ENOMEM);
bcopy(rr, rrcopy, sizeof(*rr));
rrcopy->raidPtr = (void *) raidPtrs[unit];
Home |
Main Index |
Thread Index |
Old Index