diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-01 23:17:28 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 08:03:41 +0900 |
commit | e67c8cf1cb6c09f96bc091612b4eb75aea857452 (patch) | |
tree | cfde93364c39bb4e56ccc29547850cee29c6f67f /sway | |
parent | 971b2f11f9336c220870fa7504999e0fa5fe266a (diff) |
cmd_assign: fix leak on error
Found through static analysis.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands/assign.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/commands/assign.c b/sway/commands/assign.c index 9d15e166..a90498ce 100644 --- a/sway/commands/assign.c +++ b/sway/commands/assign.c @@ -27,6 +27,7 @@ struct cmd_results *cmd_assign(int argc, char **argv) { if (strncmp(*argv, "→", strlen("→")) == 0) { if (argc < 3) { + free(criteria); return cmd_results_new(CMD_INVALID, "assign", "Missing workspace"); } ++argv; |