mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.
This commit is contained in:
2
window.c
2
window.c
@ -997,6 +997,8 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
|
||||
|
||||
wp->event = bufferevent_new(wp->fd, window_pane_read_callback, NULL,
|
||||
window_pane_error_callback, wp);
|
||||
if (wp->event == NULL)
|
||||
fatalx("out of memory");
|
||||
|
||||
bufferevent_setwatermark(wp->event, EV_READ, 0, READ_SIZE);
|
||||
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
||||
|
Reference in New Issue
Block a user