From e67c8cf1cb6c09f96bc091612b4eb75aea857452 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sun, 1 Jul 2018 23:17:28 +0900 Subject: [PATCH] cmd_assign: fix leak on error Found through static analysis. --- sway/commands/assign.c | 1 + 1 file changed, 1 insertion(+) 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;