mirror of
https://github.com/tmux/tmux.git
synced 2025-03-25 23:38:48 +00:00
Do not leak command, from David CARLIER.
This commit is contained in:
parent
c5b7faaefc
commit
2f04108f3a
@ -685,8 +685,10 @@ mode_tree_run_command(struct client *c, struct cmd_find_state *fs,
|
||||
char *command, *cause;
|
||||
|
||||
command = cmd_template_replace(template, name, 1);
|
||||
if (command == NULL || *command == '\0')
|
||||
if (command == NULL || *command == '\0') {
|
||||
free(command);
|
||||
return;
|
||||
}
|
||||
|
||||
cmdlist = cmd_string_parse(command, NULL, 0, &cause);
|
||||
if (cmdlist == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user