aboutsummaryrefslogtreecommitdiff
path: root/mode-tree.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-06-05 11:59:38 +0100
committerThomas Adam <thomas@xteddy.org>2017-06-05 11:59:38 +0100
commite62e17d0461cfb0bfb55ae3c9c7a3815235298fb (patch)
tree258f2a1e09eb8553842383636a9f6f8a3f75074a /mode-tree.c
parent1c83c0ebcd483c668f02f5f7a8cb80f8a0dc162c (diff)
parent2f04108f3a35271ef60b3028699b6363e1714140 (diff)
downloadrtmux-e62e17d0461cfb0bfb55ae3c9c7a3815235298fb.tar.gz
rtmux-e62e17d0461cfb0bfb55ae3c9c7a3815235298fb.tar.bz2
rtmux-e62e17d0461cfb0bfb55ae3c9c7a3815235298fb.zip
Merge branch 'obsd-master'
Conflicts: tmux.1 window.c
Diffstat (limited to 'mode-tree.c')
-rw-r--r--mode-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mode-tree.c b/mode-tree.c
index f3155fbf..437f0008 100644
--- a/mode-tree.c
+++ b/mode-tree.c
@@ -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) {