From d5eef0117180cf75a4984bc54417c87533a6f15a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 24 Aug 2022 07:22:31 +0000 Subject: Check for NULL returns from bufferevent_new. --- usr.bin/tmux/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/window.c') diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 44c5b886953..c1edcdd22e0 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.281 2022/06/17 07:28:05 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.282 2022/08/24 07:22:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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); -- cgit v1.2.3