diff options
author | 2018-11-19 13:35:40 +0000 | |
---|---|---|
committer | 2018-11-19 13:35:40 +0000 | |
commit | b32e1d34e10a0da806823f57f02a4ae6e93d756e (patch) | |
tree | 60ce146238243ec139a9af28986d7606c4a4871d /usr.bin/tmux/input.c | |
parent | Utilize sigio with sockets. (diff) | |
download | wireguard-openbsd-b32e1d34e10a0da806823f57f02a4ae6e93d756e.tar.xz wireguard-openbsd-b32e1d34e10a0da806823f57f02a4ae6e93d756e.zip |
evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r-- | usr.bin/tmux/input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index e97f6d7c690..df920b34f0a 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.138 2018/10/18 08:04:14 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.139 2018/11/19 13:35:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |