input_config: free new_input_config on error

Found through static analysis.
This commit is contained in:
Dominique Martinet 2018-06-30 22:05:27 +09:00
parent ebe69583c7
commit 5690bea227
14 changed files with 21 additions and 0 deletions

View file

@ -20,6 +20,7 @@ struct cmd_results *input_cmd_repeat_delay(int argc, char **argv) {
int repeat_delay = atoi(argv[0]);
if (repeat_delay < 0) {
free_input_config(new_config);
return cmd_results_new(CMD_INVALID, "repeat_delay",
"Repeat delay cannot be negative");
}