mirror of
https://github.com/swaywm/sway.git
synced 2024-11-27 02:11:28 +00:00
cmd_assign: fix leak on error
Found through static analysis.
This commit is contained in:
parent
971b2f11f9
commit
e67c8cf1cb
|
@ -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