version 1.56, 2016/01/19 15:59:12 |
version 1.57, 2016/03/01 12:06:07 |
|
|
key_bindings_unref_table(struct key_table *table) |
key_bindings_unref_table(struct key_table *table) |
{ |
{ |
struct key_binding *bd; |
struct key_binding *bd; |
|
struct key_binding *bd1; |
|
|
if (--table->references != 0) |
if (--table->references != 0) |
return; |
return; |
|
|
while (!RB_EMPTY(&table->key_bindings)) { |
RB_FOREACH_SAFE(bd, key_bindings, &table->key_bindings, bd1) { |
bd = RB_ROOT(&table->key_bindings); |
|
RB_REMOVE(key_bindings, &table->key_bindings, bd); |
RB_REMOVE(key_bindings, &table->key_bindings, bd); |
cmd_list_free(bd->cmdlist); |
cmd_list_free(bd->cmdlist); |
free(bd); |
free(bd); |