diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index f8c2fd99..94a45253 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -177,6 +177,16 @@ struct cmd_results *handle_command(char *_exec) { | |||
177 | free_argv(argc, argv); | 177 | free_argv(argc, argv); |
178 | goto cleanup; | 178 | goto cleanup; |
179 | } | 179 | } |
180 | struct cmd_results *res = handler->handle(argc-1, argv+1); | ||
181 | if (res->status != CMD_SUCCESS) { | ||
182 | free_argv(argc, argv); | ||
183 | if (results) { | ||
184 | free_cmd_results(results); | ||
185 | } | ||
186 | results = res; | ||
187 | goto cleanup; | ||
188 | } | ||
189 | free_cmd_results(res); | ||
180 | free_argv(argc, argv); | 190 | free_argv(argc, argv); |
181 | } while(cmdlist); | 191 | } while(cmdlist); |
182 | } while(head); | 192 | } while(head); |