diff options
| -rw-r--r-- | config.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1928,7 +1928,8 @@ value_to_key_combos(struct context *ctx, int action, if (idx == 0) { LOG_CONTEXTUAL_ERR( "empty binding not allowed (set to 'none' to unmap)"); - goto err; + free(copy); + return false; } remove_from_key_bindings_list(bindings, action, aux); @@ -1946,10 +1947,8 @@ value_to_key_combos(struct context *ctx, int action, return true; err: - if (idx > 0) { - for (size_t i = 0; i < used_combos; i++) - free_key_binding(&new_combos[i]); - } + for (size_t i = 0; i < used_combos; i++) + free_key_binding(&new_combos[i]); free(copy); return false; } |
