diff options
author | 2001-05-15 19:32:39 +0000 | |
---|---|---|
committer | 2001-05-15 19:32:39 +0000 | |
commit | 9ac8b1d0d337a6cb0df5b579126bd3660f711b17 (patch) | |
tree | 139eaaaca6167f2009b8cfdf0c855b2d4c3b1ae9 | |
parent | Add missing memset() from one of the select() fixes. Also free existing (diff) | |
download | wireguard-openbsd-9ac8b1d0d337a6cb0df5b579126bd3660f711b17.tar.xz wireguard-openbsd-9ac8b1d0d337a6cb0df5b579126bd3660f711b17.zip |
error out if failed to malloc memory for inode cache entry; deraadt@ ok
-rw-r--r-- | sbin/fsck_ffs/inode.c | 6 |
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; |