diff options
author | nicm <nicm> | 2017-06-04 15:36:33 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-06-04 15:36:33 +0000 |
commit | 2f04108f3a35271ef60b3028699b6363e1714140 (patch) | |
tree | bd54774f7d0f9f2c4dfe823491b9e86daeb9f771 | |
parent | c5b7faaefc80a04058381b8e61ecc6016d57bde5 (diff) | |
download | rtmux-2f04108f3a35271ef60b3028699b6363e1714140.tar.gz rtmux-2f04108f3a35271ef60b3028699b6363e1714140.tar.bz2 rtmux-2f04108f3a35271ef60b3028699b6363e1714140.zip |
Do not leak command, from David CARLIER.
-rw-r--r-- | mode-tree.c | 4 |
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) { |