aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-03-18 01:59:34 +0000
committerTiago Cunha <tcunha@gmx.com>2012-03-18 01:59:34 +0000
commit0987d552315b5781157846c23eee0ddaab4702d7 (patch)
treeae795f2be215e431d562f6985f1430c9022eaba7 /tty.c
parent5aa28473dd76c6c10c5e2e9d303250c8f8881e05 (diff)
downloadrtmux-0987d552315b5781157846c23eee0ddaab4702d7.tar.gz
rtmux-0987d552315b5781157846c23eee0ddaab4702d7.tar.bz2
rtmux-0987d552315b5781157846c23eee0ddaab4702d7.zip
Sync OpenBSD patchset 1057:
Check event_initialized before event_del if event may not have been set up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 65bfe6c8..3f8b5d0a 100644
--- a/tty.c
+++ b/tty.c
@@ -279,7 +279,8 @@ tty_close(struct tty *tty)
tty->log_fd = -1;
}
- evtimer_del(&tty->key_timer);
+ if (event_initialized(&tty->key_timer))
+ evtimer_del(&tty->key_timer);
tty_stop_tty(tty);
if (tty->flags & TTY_OPENED) {