mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
fix a few possible memory leaks
This commit is contained in:
parent
6dc1ae802b
commit
95517ac77e
3 changed files with 20 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue