diff options
author | dg <dg@FreeBSD.org> | 1994-05-29 07:50:11 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-05-29 07:50:11 +0000 |
commit | f14cfcd17fe31a3eb7c288b60ba46fb96e683c95 (patch) | |
tree | 800b3de1bfd0525f0fbd1667c152c34c9ade9389 /sys/kern/tty_subr.c | |
parent | 2f931bd07027c939a6a312b7a48bc1e51bc80594 (diff) | |
download | FreeBSD-src-f14cfcd17fe31a3eb7c288b60ba46fb96e683c95.zip FreeBSD-src-f14cfcd17fe31a3eb7c288b60ba46fb96e683c95.tar.gz |
Don't panic if we can't malloc a cblock...just print a console message
and be happy.
Diffstat (limited to 'sys/kern/tty_subr.c')
-rw-r--r-- | sys/kern/tty_subr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index 7ce49c4..d0b1496 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -92,8 +92,10 @@ cblock_alloc_cblocks(number) for (i = 0; i < number; ++i) { tmp = malloc(sizeof(struct cblock), M_TTYS, M_NOWAIT); - if (!tmp) - panic("clist_init: could not allocate cblock"); + if (!tmp) { + printf("cblock_alloc_cblocks: could not malloc cblock"); + break; + } bzero((char *)tmp, sizeof(struct cblock)); cblock_free(tmp); } |