Removed
Link Here
|
1 |
Index: control.c |
2 |
=================================================================== |
3 |
--- control.c.orig 2022-04-25 08:25:13 UTC |
4 |
+++ control.c |
5 |
@@ -775,6 +775,9 @@ control_start(struct client *c) |
6 |
|
7 |
cs->read_event = bufferevent_new(c->fd, control_read_callback, |
8 |
control_write_callback, control_error_callback, c); |
9 |
+ if (cs->read_event == NULL) |
10 |
+ fatalx("out of memory"); |
11 |
+ |
12 |
bufferevent_enable(cs->read_event, EV_READ); |
13 |
|
14 |
if (c->flags & CLIENT_CONTROLCONTROL) |
15 |
@@ -782,6 +785,8 @@ control_start(struct client *c) |
16 |
else { |
17 |
cs->write_event = bufferevent_new(c->out_fd, NULL, |
18 |
control_write_callback, control_error_callback, c); |
19 |
+ if (cs->write_event == NULL) |
20 |
+ fatalx("out of memory"); |
21 |
} |
22 |
bufferevent_setwatermark(cs->write_event, EV_WRITE, CONTROL_BUFFER_LOW, |
23 |
0); |
24 |
--- file.c.orig 2022-04-25 08:25:13 UTC |
25 |
+++ file.c |
26 |
@@ -585,6 +585,8 @@ file_write_open(struct client_files *files, struct tmu |
27 |
|
28 |
cf->event = bufferevent_new(cf->fd, NULL, file_write_callback, |
29 |
file_write_error_callback, cf); |
30 |
+ if (cf->event == NULL) |
31 |
+ fatalx("out of memory"); |
32 |
bufferevent_enable(cf->event, EV_WRITE); |
33 |
goto reply; |
34 |
|
35 |
@@ -744,6 +746,8 @@ file_read_open(struct client_files *files, struct tmux |
36 |
|
37 |
cf->event = bufferevent_new(cf->fd, file_read_callback, NULL, |
38 |
file_read_error_callback, cf); |
39 |
+ if (cf->event == NULL) |
40 |
+ fatalx("out of memory"); |
41 |
bufferevent_enable(cf->event, EV_READ); |
42 |
return; |
43 |
|
44 |
--- window.c.orig 2022-04-25 08:25:14 UTC |
45 |
+++ window.c |
46 |
@@ -1042,6 +1042,8 @@ window_pane_set_event(struct window_pane *wp) |
47 |
|
48 |
wp->event = bufferevent_new(wp->fd, window_pane_read_callback, |
49 |
NULL, window_pane_error_callback, wp); |
50 |
+ if (wp->event == NULL) |
51 |
+ fatalx("out of memory"); |
52 |
wp->ictx = input_init(wp, wp->event, &wp->palette); |
53 |
|
54 |
bufferevent_enable(wp->event, EV_READ|EV_WRITE); |
55 |
- |