diff options
author | nicm <nicm> | 2018-11-19 13:35:40 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-11-19 13:35:40 +0000 |
commit | 749f67b7d801eed03345fef9c04206fbd079c3cb (patch) | |
tree | c3f0924151a023f0f0fc52e8174577a10be94d64 /control-notify.c | |
parent | f103927a5232e0d3e8e7ad0e13aa53b4dfa2c87b (diff) | |
download | rtmux-749f67b7d801eed03345fef9c04206fbd079c3cb.tar.gz rtmux-749f67b7d801eed03345fef9c04206fbd079c3cb.tar.bz2 rtmux-749f67b7d801eed03345fef9c04206fbd079c3cb.zip |
evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.
Diffstat (limited to 'control-notify.c')
-rw-r--r-- | control-notify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/control-notify.c b/control-notify.c index 49291483..7b28e8f0 100644 --- a/control-notify.c +++ b/control-notify.c @@ -47,6 +47,8 @@ control_notify_input(struct client *c, struct window_pane *wp, */ if (winlink_find_by_window(&c->session->windows, wp->window) != NULL) { message = evbuffer_new(); + if (message == NULL) + fatalx("out of memory"); evbuffer_add_printf(message, "%%output %%%u ", wp->id); for (i = 0; i < len; i++) { if (buf[i] < ' ' || buf[i] == '\\') |