Karsten Hopp 81c285
To: vim-dev@vim.org
Karsten Hopp 81c285
Subject: Patch 7.2.211
Karsten Hopp 81c285
Fcc: outbox
Karsten Hopp 81c285
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 81c285
Mime-Version: 1.0
Karsten Hopp 81c285
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 81c285
Content-Transfer-Encoding: 8bit
Karsten Hopp 81c285
------------
Karsten Hopp 81c285
Karsten Hopp 81c285
Patch 7.2.211
Karsten Hopp 81c285
Problem:    Memory leak when expanding a series of file names.
Karsten Hopp 81c285
Solution:   Use ga_clear_strings() instead of ga_clear().
Karsten Hopp 81c285
Files:	    src/misc1.c
Karsten Hopp 81c285
Karsten Hopp 81c285
Karsten Hopp 81c285
*** ../vim-7.2.210/src/misc1.c	2009-05-17 13:30:58.000000000 +0200
Karsten Hopp 81c285
--- src/misc1.c	2009-06-24 16:16:17.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 9193,9199 ****
Karsten Hopp 81c285
  		else if (vim_strpbrk(p, (char_u *)"$~") != NULL)
Karsten Hopp 81c285
  		{
Karsten Hopp 81c285
  		    vim_free(p);
Karsten Hopp 81c285
! 		    ga_clear(&ga);
Karsten Hopp 81c285
  		    i = mch_expand_wildcards(num_pat, pat, num_file, file,
Karsten Hopp 81c285
  								       flags);
Karsten Hopp 81c285
  		    recursive = FALSE;
Karsten Hopp 81c285
--- 9193,9199 ----
Karsten Hopp 81c285
  		else if (vim_strpbrk(p, (char_u *)"$~") != NULL)
Karsten Hopp 81c285
  		{
Karsten Hopp 81c285
  		    vim_free(p);
Karsten Hopp 81c285
! 		    ga_clear_strings(&ga);
Karsten Hopp 81c285
  		    i = mch_expand_wildcards(num_pat, pat, num_file, file,
Karsten Hopp 81c285
  								       flags);
Karsten Hopp 81c285
  		    recursive = FALSE;
Karsten Hopp 81c285
*** ../vim-7.2.210/src/version.c	2009-06-24 11:57:53.000000000 +0200
Karsten Hopp 81c285
--- src/version.c	2009-06-24 16:24:32.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 678,679 ****
Karsten Hopp 81c285
--- 678,681 ----
Karsten Hopp 81c285
  {   /* Add new patch number below this line */
Karsten Hopp 81c285
+ /**/
Karsten Hopp 81c285
+     211,
Karsten Hopp 81c285
  /**/
Karsten Hopp 81c285
Karsten Hopp 81c285
-- 
Karsten Hopp 81c285
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 81c285
34. You laugh at people with 14400 baud modems.
Karsten Hopp 81c285
Karsten Hopp 81c285
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 81c285
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 81c285
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 81c285
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///