diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-23 20:27:56 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-07-23 20:31:11 -0400 |
commit | f4b882475eee7a81c206c7825616cc4656b2f60b (patch) | |
tree | 38e6ebf81b235424f105dcbcbb194e5e9eac70c0 /sway/commands/output/background.c | |
parent | Implement pid->workspace tracking (diff) | |
parent | Merge pull request #2342 from RyanDwyer/update-cursor (diff) | |
download | sway-f4b882475eee7a81c206c7825616cc4656b2f60b.tar.gz sway-f4b882475eee7a81c206c7825616cc4656b2f60b.tar.zst sway-f4b882475eee7a81c206c7825616cc4656b2f60b.zip |
Merge branch 'master' into pid-workspaces
Diffstat (limited to 'sway/commands/output/background.c')
-rw-r--r-- | sway/commands/output/background.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index 55cbdff0..4ed56c2a 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c | |||
@@ -72,7 +72,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { | |||
72 | src = strdup(p.we_wordv[0]); | 72 | src = strdup(p.we_wordv[0]); |
73 | wordfree(&p); | 73 | wordfree(&p); |
74 | if (!src) { | 74 | if (!src) { |
75 | wlr_log(L_ERROR, "Failed to duplicate string"); | 75 | wlr_log(WLR_ERROR, "Failed to duplicate string"); |
76 | return cmd_results_new(CMD_FAILURE, "output", | 76 | return cmd_results_new(CMD_FAILURE, "output", |
77 | "Unable to allocate resource"); | 77 | "Unable to allocate resource"); |
78 | } | 78 | } |
@@ -80,9 +80,10 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { | |||
80 | if (config->reading && *src != '/') { | 80 | if (config->reading && *src != '/') { |
81 | // src file is inside configuration dir | 81 | // src file is inside configuration dir |
82 | 82 | ||
83 | char *conf = strdup(config->current_config); | 83 | char *conf = strdup(config->current_config_path); |
84 | if(!conf) { | 84 | if (!conf) { |
85 | wlr_log(L_ERROR, "Failed to duplicate string"); | 85 | wlr_log(WLR_ERROR, "Failed to duplicate string"); |
86 | free(src); | ||
86 | return cmd_results_new(CMD_FAILURE, "output", | 87 | return cmd_results_new(CMD_FAILURE, "output", |
87 | "Unable to allocate resources"); | 88 | "Unable to allocate resources"); |
88 | } | 89 | } |
@@ -93,7 +94,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { | |||
93 | if (!src) { | 94 | if (!src) { |
94 | free(rel_path); | 95 | free(rel_path); |
95 | free(conf); | 96 | free(conf); |
96 | wlr_log(L_ERROR, "Unable to allocate memory"); | 97 | wlr_log(WLR_ERROR, "Unable to allocate memory"); |
97 | return cmd_results_new(CMD_FAILURE, "output", | 98 | return cmd_results_new(CMD_FAILURE, "output", |
98 | "Unable to allocate resources"); | 99 | "Unable to allocate resources"); |
99 | } | 100 | } |