summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-05-22 14:00:16 +0200
committerBram Moolenaar <Bram@vim.org>2014-05-22 14:00:16 +0200
commit050fe7ebad159f48704bd3a991632d0330ef0cf2 (patch)
treee2418297970110ece00215f266edbc7b519ca6f8 /src/ex_cmds.c
parent1c5a2134dbf880859281c676b834c5a636f78f52 (diff)
updated for version 7.4.297v7.4.297
Problem: Memory leak from result of get_isolated_shell_name(). Solution: Free the memory. (Dominique Pelle)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index f52e2abcd5..2e5917f4a2 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1554,9 +1554,11 @@ make_filter_cmd(cmd, itmp, otmp)
#if (defined(UNIX) && !defined(ARCHIE)) || defined(OS2)
int is_fish_shell;
+ char_u *shell_name = get_isolated_shell_name();
/* Account for fish's different syntax for subshells */
- is_fish_shell = (fnamecmp(get_isolated_shell_name(), "fish") == 0);
+ is_fish_shell = (fnamecmp(shell_name, "fish") == 0);
+ vim_free(shell_name);
if (is_fish_shell)
len = (long_u)STRLEN(cmd) + 13; /* "begin; " + "; end" + NUL */
else