Check for NULL returns from bufferevent_new.

This commit is contained in:
nicm
2022-08-24 07:22:30 +00:00
parent 416c27c995
commit e867528209
3 changed files with 10 additions and 0 deletions

View File

@ -1033,6 +1033,8 @@ window_pane_set_event(struct window_pane *wp)
wp->event = bufferevent_new(wp->fd, window_pane_read_callback,
NULL, window_pane_error_callback, wp);
if (wp->event == NULL)
fatalx("out of memory");
wp->ictx = input_init(wp, wp->event, &wp->palette);
bufferevent_enable(wp->event, EV_READ|EV_WRITE);