cmd_assign: fix leak on error

Found through static analysis.
master
Dominique Martinet 7 years ago
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…
Cancel
Save