shell: free the key in cmd_exec()

This commit is contained in:
S.J.R. van Schaik 2017-06-14 13:21:49 +02:00
parent a5e783b6bb
commit 92fc0e0ff1

View file

@ -72,9 +72,11 @@ void cmd_exec(struct cmd *cmds, const char *line)
for (cmd = cmds; cmd->key; ++cmd) {
if (strcmp(cmd->key, key) == 0) {
cmd->exec(args);
return;
break;
}
}
free(key);
}
void cmd_loop(const char *show)