aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-01-29 12:53:33 +0000
committerTiago Cunha <tcunha@gmx.com>2012-01-29 12:53:33 +0000
commite23df3af5a57d28ba40b14db1ad6d62f0ee99940 (patch)
treea70888bbd92b8586121eeac1a508b9f08cb2a91d /window.c
parent9c1d3046cac8b999e0b2be4bc0f126bd889ea1c1 (diff)
downloadrtmux-e23df3af5a57d28ba40b14db1ad6d62f0ee99940.tar.gz
rtmux-e23df3af5a57d28ba40b14db1ad6d62f0ee99940.tar.bz2
rtmux-e23df3af5a57d28ba40b14db1ad6d62f0ee99940.zip
Sync OpenBSD patchset 1014:
Call bufferevent_free before closing file descriptor associated with it or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers in a twist. From Dylan Alex Simon.
Diffstat (limited to 'window.c')
-rw-r--r--window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/window.c b/window.c
index 97337207..111eb9c1 100644
--- a/window.c
+++ b/window.c
@@ -608,8 +608,8 @@ window_pane_destroy(struct window_pane *wp)
window_pane_reset_mode(wp);
if (wp->fd != -1) {
- close(wp->fd);
bufferevent_free(wp->event);
+ close(wp->fd);
}
input_free(wp);
@@ -619,8 +619,8 @@ window_pane_destroy(struct window_pane *wp)
grid_destroy(wp->saved_grid);
if (wp->pipe_fd != -1) {
- close(wp->pipe_fd);
bufferevent_free(wp->pipe_event);
+ close(wp->pipe_fd);
}
RB_REMOVE(window_pane_tree, &all_window_panes, wp);
@@ -644,8 +644,8 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell,
struct termios tio2;
if (wp->fd != -1) {
- close(wp->fd);
bufferevent_free(wp->event);
+ close(wp->fd);
}
if (cmd != NULL) {
if (wp->cmd != NULL)