=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.310 retrieving revision 1.311 diff -c -r1.310 -r1.311 *** src/usr.bin/tmux/tty.c 2018/10/25 15:13:38 1.310 --- src/usr.bin/tmux/tty.c 2018/11/19 13:35:41 1.311 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.310 2018/10/25 15:13:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.311 2018/11/19 13:35:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 258,266 **** --- 258,270 ---- event_set(&tty->event_in, tty->fd, EV_PERSIST|EV_READ, tty_read_callback, tty); tty->in = evbuffer_new(); + if (tty->in == NULL) + fatal("out of memory"); event_set(&tty->event_out, tty->fd, EV_WRITE, tty_write_callback, tty); tty->out = evbuffer_new(); + if (tty->out == NULL) + fatal("out of memory"); evtimer_set(&tty->timer, tty_timer_callback, tty);