diff options
Diffstat (limited to 'term')
-rw-r--r-- | term/ChangeLog | 5 | ||||
-rw-r--r-- | term/main.c | 2 | ||||
-rw-r--r-- | term/munge.c | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/term/ChangeLog b/term/ChangeLog index f3aee05e..88ae64c9 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 30 00:27:14 1999 Thomas Bushnell, BSG <tb@mit.edu> + + * munge.c (create_queue): Make sure that malloc succeeds. + Reported by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>. + 1998-10-24 Roland McGrath <roland@baalperazim.frob.com> * users.c (open_hook): Assert DTR if NO_CARRIER, even for CLOCAL. diff --git a/term/main.c b/term/main.c index 10ed9eef..d14c7c48 100644 --- a/term/main.c +++ b/term/main.c @@ -172,7 +172,9 @@ main (int argc, char **argv) term_mode = (bottom == &ptyio_bottom ? 0666 : 0600) | S_IFCHR | S_IROOT; inputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); + rawq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); + outputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); if (bottom == &ptyio_bottom) diff --git a/term/munge.c b/term/munge.c index 653d32ba..f9cb5d72 100644 --- a/term/munge.c +++ b/term/munge.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -713,12 +713,16 @@ create_queue (int size, int lowat, int hiwat) struct queue *q; q = malloc (sizeof (struct queue) + size * sizeof (quoted_char)); + assert (q); + q->susp = 0; q->lowat = lowat; q->hiwat = hiwat; q->cs = q->ce = q->array; q->arraylen = size; q->wait = malloc (sizeof (struct condition)); + assert (q->wait); + condition_init (q->wait); return q; } |