shell: free the key in cmd_exec()
This commit is contained in:
parent
a5e783b6bb
commit
92fc0e0ff1
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue