diff options
author | 2017-09-08 08:45:27 +0000 | |
---|---|---|
committer | 2017-09-08 08:45:27 +0000 | |
commit | 17ad7e88859c1eb98608d9f1d53adf863ae91a20 (patch) | |
tree | e58a1928bbeff98d1da0b44e99ec65dfdabe1ccd | |
parent | fdc: Print warning if kthread_create fails (diff) | |
download | wireguard-openbsd-17ad7e88859c1eb98608d9f1d53adf863ae91a20.tar.xz wireguard-openbsd-17ad7e88859c1eb98608d9f1d53adf863ae91a20.zip |
When removing a key table clear it out of clients, fixes issue with
unbind -a reported by Thomas Sattler.
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index e29e2a20b80..a75b17fafc9 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.81 2017/06/09 14:00:46 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.82 2017/09/08 08:45:27 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -138,12 +138,17 @@ void key_bindings_remove_table(const char *name) { struct key_table *table; + struct client *c; table = key_bindings_get_table(name, 0); if (table != NULL) { RB_REMOVE(key_tables, &key_tables, table); key_bindings_unref_table(table); } + TAILQ_FOREACH(c, &clients, entry) { + if (c->keytable == table) + server_client_set_key_table(c, NULL); + } } void |