diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-03-07 09:22:57 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-03-07 09:22:57 +0000 |
commit | ce16f788cf4102b61130b5cea4e4087a8248097d (patch) | |
tree | 0c55a9e607e8a5bfb826226b29eeddf34991493c | |
parent | d00d48e97c480d6bf43e4e873d5d177b0eac3cbc (diff) |
Notes
-rw-r--r-- | sys/kern/tty_subr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index 7c04317c7f26b..2c3346eca7cb2 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tty_subr.c,v 1.22 1996/04/08 01:22:00 davidg Exp $ + * $Id: tty_subr.c,v 1.23 1996/09/14 10:53:48 bde Exp $ */ /* @@ -131,7 +131,12 @@ cblock_alloc_cblocks(number) struct cblock *cbp; for (i = 0; i < number; ++i) { - cbp = malloc(sizeof *cbp, M_TTYS, M_WAITOK); + cbp = malloc(sizeof *cbp, M_TTYS, M_NOWAIT); + if (cbp == NULL) { + printf( +"clist_alloc_cblocks: M_NOWAIT malloc failed, trying M_WAITOK\n"); + cbp = malloc(sizeof *cbp, M_TTYS, M_WAITOK); + } /* * Freed cblocks have zero quotes and garbage elsewhere. * Set the may-have-quote bit to force zeroing the quotes. |