mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
cmd_assign: fix leak on error
Found through static analysis.
This commit is contained in:
parent
971b2f11f9
commit
e67c8cf1cb
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue