input: parse_key_binding: free key-codes list if 'bindings' is NULL

This commit is contained in:
Daniel Eklöf 2020-07-15 13:26:13 +02:00
parent 9cdccdd2ac
commit f21ea97037
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 3 additions and 1 deletions

View file

@ -197,7 +197,8 @@ input_parse_key_binding(struct xkb_keymap *keymap, const char *combos,
};
tll_push_back(*bindings, binding);
}
} else
tll_free(key_codes);
}
free(copy);

View file

@ -47,6 +47,7 @@ enum bind_action_normal {
struct key_binding_normal {
struct key_binding bind;
enum bind_action_normal action;
const char *spawn;
};
struct mouse_binding {