aboutsummaryrefslogtreecommitdiff
path: root/tmux.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2010-07-02 02:43:01 +0000
committerTiago Cunha <tcunha@gmx.com>2010-07-02 02:43:01 +0000
commit03c1c1cd9f731a8a5a066855077e91e31d2baf34 (patch)
tree832957257356595b9739132bd7d72aeea410f7a7 /tmux.c
parent0e70c8801cc4143b9100c860df1f2e3aac368d0a (diff)
downloadrtmux-03c1c1cd9f731a8a5a066855077e91e31d2baf34.tar.gz
rtmux-03c1c1cd9f731a8a5a066855077e91e31d2baf34.tar.bz2
rtmux-03c1c1cd9f731a8a5a066855077e91e31d2baf34.zip
Sync OpenBSD patchset 727:
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list. While here, also print bind-key -n and the rest of the flags properly. Fixes problem reported by mcbride@.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index f86eca78..720ed94b 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.209 2010-06-05 23:56:29 tcunha Exp $ */
+/* $Id: tmux.c,v 1.210 2010-07-02 02:43:01 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -520,7 +520,7 @@ main(int argc, char **argv)
exit(1);
}
cmdflags &= ~CMD_STARTSERVER;
- TAILQ_FOREACH(cmd, cmdlist, qentry) {
+ TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
if (cmd->entry->flags & CMD_STARTSERVER)
cmdflags |= CMD_STARTSERVER;
if (cmd->entry->flags & CMD_SENDENVIRON)