diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-12-29 14:44:39 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-01-05 00:07:34 +0100 |
commit | 19ddb70a3296a7cc3256be65c488c18d87de4261 (patch) | |
tree | eb3977fb64b7b739f8575d03402e235fa9836921 /sway/config.c | |
parent | 9a326be7f881f8589049a517b9e3112b562d81ea (diff) |
fixup free config use free_sway_binding
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sway/config.c b/sway/config.c index 37f6e75a..627ed94f 100644 --- a/sway/config.c +++ b/sway/config.c @@ -31,15 +31,6 @@ struct sway_config *config = NULL; -static void free_binding(struct sway_binding *bind) { - if (!bind) { - return; - } - free_flat_list(bind->keys); - free(bind->command); - free(bind); -} - static void free_mode(struct sway_mode *mode) { int i; @@ -49,13 +40,13 @@ static void free_mode(struct sway_mode *mode) { free(mode->name); if (mode->keysym_bindings) { for (i = 0; i < mode->keysym_bindings->length; i++) { - free_binding(mode->keysym_bindings->items[i]); + free_sway_binding(mode->keysym_bindings->items[i]); } list_free(mode->keysym_bindings); } if (mode->keycode_bindings) { for (i = 0; i < mode->keycode_bindings->length; i++) { - free_binding(mode->keycode_bindings->items[i]); + free_sway_binding(mode->keycode_bindings->items[i]); } list_free(mode->keycode_bindings); } |