diff options
author | emersion <contact@emersion.fr> | 2018-07-19 16:14:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 16:14:25 +0100 |
commit | d8badceb546483a675133235536afcdb897c0e9c (patch) | |
tree | 9179266f0683c1931b9d5274fbeebe23f420186a /sway/config.c | |
parent | 3a13455b4e23990bb8cdc96f231ab7a78c2d98df (diff) | |
parent | ec652866060a178796d6dbb32bf7f0e2101e56c9 (diff) |
Merge pull request #2304 from RedSoxFan/fix-2298
Fix deferred command handling
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 4 |
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); } |