aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 42d6b173..ab24f6ae 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -105,6 +105,10 @@ static bool cmd_bindsym(struct sway_config *config, int argc, char **argv) {
xkb_keysym_t sym = xkb_keysym_from_name(split->items[i], XKB_KEYSYM_CASE_INSENSITIVE);
if (!sym) {
sway_log(L_ERROR, "bindsym - unknown key %s", (char *)split->items[i]);
+ list_free(binding->keys);
+ free(binding->command);
+ free(binding);
+ list_free(split);
return false;
}
xkb_keysym_t *key = malloc(sizeof(xkb_keysym_t));