=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.69 retrieving revision 1.70 diff -c -r1.69 -r1.70 *** src/usr.bin/tmux/window.c 2011/11/15 23:19:51 1.69 --- src/usr.bin/tmux/window.c 2012/01/29 02:22:11 1.70 *************** *** 1,4 **** ! /* $OpenBSD: window.c,v 1.69 2011/11/15 23:19:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window.c,v 1.70 2012/01/29 02:22:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 611,618 **** window_pane_reset_mode(wp); if (wp->fd != -1) { - close(wp->fd); bufferevent_free(wp->event); } input_free(wp); --- 611,618 ---- window_pane_reset_mode(wp); if (wp->fd != -1) { bufferevent_free(wp->event); + close(wp->fd); } input_free(wp); *************** *** 622,629 **** grid_destroy(wp->saved_grid); if (wp->pipe_fd != -1) { - close(wp->pipe_fd); bufferevent_free(wp->pipe_event); } RB_REMOVE(window_pane_tree, &all_window_panes, wp); --- 622,629 ---- grid_destroy(wp->saved_grid); if (wp->pipe_fd != -1) { bufferevent_free(wp->pipe_event); + close(wp->pipe_fd); } RB_REMOVE(window_pane_tree, &all_window_panes, wp); *************** *** 647,654 **** struct termios tio2; if (wp->fd != -1) { - close(wp->fd); bufferevent_free(wp->event); } if (cmd != NULL) { if (wp->cmd != NULL) --- 647,654 ---- struct termios tio2; if (wp->fd != -1) { bufferevent_free(wp->event); + close(wp->fd); } if (cmd != NULL) { if (wp->cmd != NULL)