Hi
I see the following memory leak in Vim-7.4.295.
The leak was introduced recently in Vim-7.4.276:
==12437== 15 bytes in 3 blocks are definitely lost in loss record 28 of 349
==12437== at 0x4C2C857: malloc (vg_replace_malloc.c:291)
==12437== by 0x4B082D: lalloc (misc2.c:921)
==12437== by 0x4B092E: alloc (misc2.c:820)
==12437== by 0x4B127B: vim_strsave (misc2.c:1245)
==12437== by 0x4ADA15: get_isolated_shell_name (misc1.c:10897)
==12437== by 0x446031: make_filter_cmd (ex_cmds.c:1559)
==12437== by 0x449275: do_bang (ex_cmds.c:1192)
==12437== by 0x45456B: ex_bang (ex_docmd.c:8776)
==12437== by 0x45E2B2: do_cmdline (ex_docmd.c:2701)
==12437== by 0x4BDF6B: nv_colon (normal.c:5308)
==12437== by 0x4C37F9: normal_cmd (normal.c:1156)
==12437== by 0x57ADA3: main_loop (main.c:1325)
==12437== by 0x57DEBB: main (main.c:1025)
I can reproduce it by running:
:%!ls
Attached patch fixes it.
Regards
Dominique
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff -r 32de51778c27 src/ex_cmds.c
--- a/src/ex_cmds.c Tue May 13 20:23:24 2014 +0200
+++ b/src/ex_cmds.c Tue May 13 22:49:26 2014 +0200
@@ -1554,9 +1554,11 @@
#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