summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-04-26 10:24:27 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-04-26 10:24:27 +0000
commite36c521bc8fb42ec39a478a61b68f80803204339 (patch)
tree0cfc5201c60f6d49be586f6d47e3a1cc41f490c4 /usr.bin/tmux
parent46762512d73da3073ecb5fd57fe11428dd35c0ee (diff)
Destroy panes before options to avoid crash when forced into a mode by a
hook.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 0eff1d8c649..1a05fe6ba72 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.226 2019/04/17 14:37:48 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.227 2019/04/26 10:24:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -344,6 +344,8 @@ window_destroy(struct window *w)
layout_free_cell(w->saved_layout_root);
free(w->old_layout);
+ window_destroy_panes(w);
+
if (event_initialized(&w->name_event))
evtimer_del(&w->name_event);
@@ -354,8 +356,6 @@ window_destroy(struct window *w)
options_free(w->options);
- window_destroy_panes(w);
-
free(w->name);
free(w);
}