summaryrefslogtreecommitdiffstats
path: root/cmd-unbind-key.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-08-21 12:36:43 +0000
committerTiago Cunha <tcunha@gmx.com>2011-08-21 12:36:43 +0000
commitabb4af7a147d5c109de4c5a30895f538ebab6941 (patch)
tree169d0005b355068367f34071de5b862060c054be /cmd-unbind-key.c
parentb9bbe1d81c41411f62e73c180c02ec05cc224efd (diff)
Sync OpenBSD patchset 944:
Use key_bindings_remove for unbind-key -a to allow it to work from key bindings. From "miaout17" SF bug 3392063.
Diffstat (limited to 'cmd-unbind-key.c')
-rw-r--r--cmd-unbind-key.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-unbind-key.c b/cmd-unbind-key.c
index 4de6f9e2..7ecf3069 100644
--- a/cmd-unbind-key.c
+++ b/cmd-unbind-key.c
@@ -59,9 +59,7 @@ cmd_unbind_key_exec(struct cmd *self, unused struct cmd_ctx *ctx)
if (args_has(args, 'a')) {
while (!SPLAY_EMPTY(&key_bindings)) {
bd = SPLAY_ROOT(&key_bindings);
- SPLAY_REMOVE(key_bindings, &key_bindings, bd);
- cmd_list_free(bd->cmdlist);
- xfree(bd);
+ key_bindings_remove(bd->key);
}
return (0);
}