Hi I see a memory leak in Vim-7.3b BETA (2376:878562053ba3) when doing :find <CTRL-D>
==5706== 88 bytes in 2 blocks are definitely lost in loss record 92 of 117 ==5706== at 0x4024F70: malloc (vg_replace_malloc.c:236) ==5706== by 0x813778A: lalloc (misc2.c:920) ==5706== by 0x817C667: vim_regcomp (regexp.c:1063) ==5706== by 0x8135A9F: uniquefy_paths (misc1.c:9370) ==5706== by 0x8135FB8: gen_expand_wildcards (misc1.c:9587) ==5706== by 0x8134F6F: expand_wildcards (misc1.c:8568) ==5706== by 0x8134F1E: expand_wildcards_eval (misc1.c:8539) ==5706== by 0x80DF179: ExpandFromContext (ex_getln.c:4464) ==5706== by 0x80DEE62: expand_cmdline (ex_getln.c:4356) ==5706== by 0x80DE33A: showmatches (ex_getln.c:3858) ==5706== by 0x80DA4D3: getcmdline (ex_getln.c:1167) ==5706== by 0x80DBA38: getexline (ex_getln.c:2129) ==5706== by 0x80C5EAD: do_cmdline (ex_docmd.c:1018) ==5706== by 0x814DDE9: nv_colon (normal.c:5295) ==5706== by 0x814751F: normal_cmd (normal.c:1188) ==5706== by 0x8108F38: main_loop (main.c:1256) ==5706== by 0x810898F: main (main.c:964) Fixed in attached patch. -- 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
diff -r 878562053ba3 src/misc1.c --- a/src/misc1.c Thu Jul 22 22:30:23 2010 +0200 +++ b/src/misc1.c Thu Jul 22 23:47:35 2010 +0200 @@ -9306,7 +9306,7 @@ } /* - * Remove adjecent duplicate entries from "gap", which is a list of file names + * Remove adjacent duplicate entries from "gap", which is a list of file names * in allocated memory. */ static void @@ -9354,7 +9354,7 @@ /* * We need to prepend a '*' at the beginning of file_pattern so that the * regex matches anywhere in the path. FIXME: is this valid for all - * possible pattern? + * possible patterns? */ len = (int)STRLEN(pattern); file_pattern = alloc(len + 2); @@ -9391,6 +9391,7 @@ } } + vim_free(regmatch.regprog); if (sort_again) { sort_strings(fnames, gap->ga_len);