summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/inode.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-15 19:32:40 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-05-15 19:32:40 +0000
commitdd8efeb8ea9d7791b0917a7e0af21555c2a4939b (patch)
tree4d490edb12fabb3c1ae583648023a547a0e841cb /sbin/fsck_ffs/inode.c
parent823a5421f0e30fea5d78c35d8cc26cb7f4f9eb2e (diff)
error out if failed to malloc memory for inode cache entry; deraadt@ ok
Diffstat (limited to 'sbin/fsck_ffs/inode.c')
-rw-r--r--sbin/fsck_ffs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index 063ffc20bb4..ba303c99ebb 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inode.c,v 1.15 2001/03/02 08:33:55 art Exp $ */
+/* $OpenBSD: inode.c,v 1.16 2001/05/15 19:32:39 mickey Exp $ */
/* $NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)inode.c 8.5 (Berkeley) 2/8/95";
#else
-static char rcsid[] = "$OpenBSD: inode.c,v 1.15 2001/03/02 08:33:55 art Exp $";
+static char rcsid[] = "$OpenBSD: inode.c,v 1.16 2001/05/15 19:32:39 mickey Exp $";
#endif
#endif /* not lint */
@@ -386,7 +386,7 @@ cacheino(dp, inumber)
inp = (struct inoinfo *)
malloc(sizeof(*inp) + (blks ? blks - 1 : 0) * sizeof(daddr_t));
if (inp == NULL)
- return;
+ errexit("cannot allocate memory for inode cache");
inpp = &inphead[inumber % numdirs];
inp->i_nexthash = *inpp;
*inpp = inp;