From 19ddb70a3296a7cc3256be65c488c18d87de4261 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 29 Dec 2017 14:44:39 +0100 Subject: [PATCH] fixup free config use free_sway_binding --- sway/config.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sway/config.c b/sway/config.c index 37f6e75a8..627ed94f5 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); }