aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorBrian Ashworth <RedSoxFan@users.noreply.github.com>2018-10-08 15:18:49 -0400
committerGitHub <noreply@github.com>2018-10-08 15:18:49 -0400
commit3f328b62768d7801f0544b31ab8f9dde3014fd1d (patch)
tree3572a9e1bff58710c22638d85ce1206af3999d94 /sway/config.c
parentd21d2c8665f8fdaad719bb81cc636052f7c1d1a1 (diff)
parenta03955f9368cfa1c190e4194eed8437dce22eb77 (diff)
Merge branch 'master' into popup-during-fullscreen
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c6
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) {
free(config->floating_scroll_left_cmd);
free(config->floating_scroll_right_cmd);
free(config->font);
+ free(config->swaybg_command);
+ free(config->swaynag_command);
free((char *)config->current_config_path);
free((char *)config->current_config);
free(config);
@@ -166,7 +168,7 @@ static void set_color(float dest[static 4], uint32_t color) {
}
static void config_defaults(struct sway_config *config) {
- config->swaynag_command = strdup("swaynag");
+ if (!(config->swaynag_command = strdup("swaynag"))) goto cleanup;
config->swaynag_config_errors = (struct swaynag_instance){
.args = "--type error "
"--message 'There are errors in your config file' "
@@ -241,6 +243,8 @@ static void config_defaults(struct sway_config *config) {
if (!(config->active_bar_modifiers = create_list())) goto cleanup;
+ if (!(config->swaybg_command = strdup("swaybg"))) goto cleanup;
+
if (!(config->config_chain = create_list())) goto cleanup;
config->current_config_path = NULL;
config->current_config = NULL;