mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 21:14:10 +01: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 (strncmp(*argv, "→", strlen("→")) == 0) {
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
|
free(criteria);
|
||||||
return cmd_results_new(CMD_INVALID, "assign", "Missing workspace");
|
return cmd_results_new(CMD_INVALID, "assign", "Missing workspace");
|
||||||
}
|
}
|
||||||
++argv;
|
++argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user