2729bb3
To: vim-dev@vim.org
2729bb3
Subject: Patch 7.1.230
2729bb3
Fcc: outbox
2729bb3
From: Bram Moolenaar <Bram@moolenaar.net>
2729bb3
Mime-Version: 1.0
2729bb3
Content-Type: text/plain; charset=ISO-8859-1
2729bb3
Content-Transfer-Encoding: 8bit
2729bb3
------------
2729bb3
2729bb3
Patch 7.1.230
2729bb3
Problem:    Memory leak when executing SourceCmd autocommands.
2729bb3
Solution:   Free the memory. (Dominique Pelle)
2729bb3
Files:	    src/ex_cmds2.c
2729bb3
2729bb3
2729bb3
*** ../vim-7.1.229/src/ex_cmds2.c	Sun Jan  6 20:05:36 2008
2729bb3
--- src/ex_cmds2.c	Tue Jan 15 20:41:28 2008
2729bb3
***************
2729bb3
*** 2889,2899 ****
2729bb3
      if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
2729bb3
  	    && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
2729bb3
  							       FALSE, curbuf))
2729bb3
  # ifdef FEAT_EVAL
2729bb3
! 	return aborting() ? FAIL : OK;
2729bb3
  # else
2729bb3
! 	return OK;
2729bb3
  # endif
2729bb3
  
2729bb3
      /* Apply SourcePre autocommands, they may get the file. */
2729bb3
      apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
2729bb3
--- 2889,2902 ----
2729bb3
      if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
2729bb3
  	    && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
2729bb3
  							       FALSE, curbuf))
2729bb3
+     {
2729bb3
  # ifdef FEAT_EVAL
2729bb3
! 	retval = aborting() ? FAIL : OK;
2729bb3
  # else
2729bb3
! 	retval = OK;
2729bb3
  # endif
2729bb3
+ 	goto theend;
2729bb3
+     }
2729bb3
  
2729bb3
      /* Apply SourcePre autocommands, they may get the file. */
2729bb3
      apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
2729bb3
*** ../vim-7.1.229/src/version.c	Mon Jan 14 20:11:37 2008
2729bb3
--- src/version.c	Tue Jan 15 22:15:03 2008
2729bb3
***************
2729bb3
*** 668,669 ****
2729bb3
--- 668,671 ----
2729bb3
  {   /* Add new patch number below this line */
2729bb3
+ /**/
2729bb3
+     230,
2729bb3
  /**/
2729bb3
2729bb3
-- 
2729bb3
Citizens are not allowed to attend a movie house or theater nor ride in a
2729bb3
public streetcar within at least four hours after eating garlic.
2729bb3
		[real standing law in Indiana, United States of America]
2729bb3
2729bb3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
2729bb3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2729bb3
\\\        download, build and distribute -- http://www.A-A-P.org        ///
2729bb3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///