From 749f67b7d801eed03345fef9c04206fbd079c3cb Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 19 Nov 2018 13:35:40 +0000 Subject: evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547. --- input.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index 41cdfb70..d9f419fe 100644 --- a/input.c +++ b/input.c @@ -767,6 +767,8 @@ input_init(struct window_pane *wp) ictx->input_buf = xmalloc(INPUT_BUF_START); ictx->since_ground = evbuffer_new(); + if (ictx->since_ground == NULL) + fatalx("out of memory"); evtimer_set(&ictx->timer, input_timer_callback, ictx); -- cgit