From bae90071a15be813307b2a06b01f216de92953a5 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 30 Oct 1994 19:43:49 +0000 Subject: Don't attempt to free null cblocks. There may be less to free than normal due to cblock resource starvation or malloc() failing when the device is opened. --- sys/kern/subr_clist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/kern/subr_clist.c') diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c index 26f42fb..46a8f1e 100644 --- a/sys/kern/subr_clist.c +++ b/sys/kern/subr_clist.c @@ -6,7 +6,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id: tty_subr.c,v 1.6 1994/09/13 16:02:20 davidg Exp $ + * $Id: tty_subr.c,v 1.7 1994/09/25 19:33:50 phk Exp $ */ /* @@ -118,6 +118,8 @@ cblock_free_cblocks(number) for (i = 0; i < number; ++i) { tmp = cblock_alloc(); + if (tmp == NULL) + return; free(tmp, M_TTYS); } } -- cgit v1.1