aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-19 16:14:25 +0100
committerGitHub <noreply@github.com>2018-07-19 16:14:25 +0100
commitd8badceb546483a675133235536afcdb897c0e9c (patch)
tree9179266f0683c1931b9d5274fbeebe23f420186a /sway/config.c
parent3a13455b4e23990bb8cdc96f231ab7a78c2d98df (diff)
parentec652866060a178796d6dbb32bf7f0e2101e56c9 (diff)
Merge pull request #2304 from RedSoxFan/fix-2298
Fix deferred command handling
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index c620e4c7..00500812 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -649,7 +649,6 @@ bool read_config(FILE *file, struct sway_config *config) {
} else {
res = config_command(expanded);
}
- free(expanded);
switch(res->status) {
case CMD_FAILURE:
case CMD_INVALID:
@@ -660,7 +659,7 @@ bool read_config(FILE *file, struct sway_config *config) {
case CMD_DEFER:
wlr_log(WLR_DEBUG, "Deferring command `%s'", line);
- list_add(config->cmd_queue, strdup(line));
+ list_add(config->cmd_queue, strdup(expanded));
break;
case CMD_BLOCK_COMMANDS:
@@ -693,6 +692,7 @@ bool read_config(FILE *file, struct sway_config *config) {
sizeof(config->handler_context));
default:;
}
+ free(expanded);
free(line);
free_cmd_results(res);
}