evbuffer_new and bufferevent_new can both fail (when malloc fails) and

return NULL. GitHub issue 1547.
This commit is contained in:
nicm
2018-11-19 13:35:40 +00:00
parent f103927a52
commit 749f67b7d8
8 changed files with 24 additions and 0 deletions

View File

@ -166,6 +166,8 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmdq_item *item)
cmd_pipe_pane_write_callback,
cmd_pipe_pane_error_callback,
wp);
if (wp->pipe_event == NULL)
fatalx("out of memory");
if (out)
bufferevent_enable(wp->pipe_event, EV_WRITE);
if (in)