diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 070b15c8..a50e9144 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -136,6 +136,8 @@ void free_config(struct sway_config *config) { | |||
136 | free(config->floating_scroll_left_cmd); | 136 | free(config->floating_scroll_left_cmd); |
137 | free(config->floating_scroll_right_cmd); | 137 | free(config->floating_scroll_right_cmd); |
138 | free(config->font); | 138 | free(config->font); |
139 | free(config->swaybg_command); | ||
140 | free(config->swaynag_command); | ||
139 | free((char *)config->current_config_path); | 141 | free((char *)config->current_config_path); |
140 | free((char *)config->current_config); | 142 | free((char *)config->current_config); |
141 | free(config); | 143 | free(config); |
@@ -166,7 +168,7 @@ static void set_color(float dest[static 4], uint32_t color) { | |||
166 | } | 168 | } |
167 | 169 | ||
168 | static void config_defaults(struct sway_config *config) { | 170 | static void config_defaults(struct sway_config *config) { |
169 | config->swaynag_command = strdup("swaynag"); | 171 | if (!(config->swaynag_command = strdup("swaynag"))) goto cleanup; |
170 | config->swaynag_config_errors = (struct swaynag_instance){ | 172 | config->swaynag_config_errors = (struct swaynag_instance){ |
171 | .args = "--type error " | 173 | .args = "--type error " |
172 | "--message 'There are errors in your config file' " | 174 | "--message 'There are errors in your config file' " |
@@ -241,6 +243,8 @@ static void config_defaults(struct sway_config *config) { | |||
241 | 243 | ||
242 | if (!(config->active_bar_modifiers = create_list())) goto cleanup; | 244 | if (!(config->active_bar_modifiers = create_list())) goto cleanup; |
243 | 245 | ||
246 | if (!(config->swaybg_command = strdup("swaybg"))) goto cleanup; | ||
247 | |||
244 | if (!(config->config_chain = create_list())) goto cleanup; | 248 | if (!(config->config_chain = create_list())) goto cleanup; |
245 | config->current_config_path = NULL; | 249 | config->current_config_path = NULL; |
246 | config->current_config = NULL; | 250 | config->current_config = NULL; |