Karsten Hopp 0f7bbd
To: vim-dev@vim.org
Karsten Hopp 0f7bbd
Subject: Patch 7.2.018
Karsten Hopp 0f7bbd
Fcc: outbox
Karsten Hopp 0f7bbd
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 0f7bbd
Mime-Version: 1.0
Karsten Hopp 0f7bbd
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 0f7bbd
Content-Transfer-Encoding: 8bit
Karsten Hopp 0f7bbd
------------
Karsten Hopp 0f7bbd
Karsten Hopp 0f7bbd
Patch 7.2.018
Karsten Hopp 0f7bbd
Problem:    Memory leak when substitute is aborted.
Karsten Hopp 0f7bbd
Solution:   Free the buffer allocated for the new text. (Dominique Pelle)
Karsten Hopp 0f7bbd
Files:	    src/ex_cmds.c
Karsten Hopp 0f7bbd
Karsten Hopp 0f7bbd
Karsten Hopp 0f7bbd
*** ../vim-7.2.017/src/ex_cmds.c	Wed Aug  6 15:03:07 2008
Karsten Hopp 0f7bbd
--- src/ex_cmds.c	Sun Sep 14 13:45:03 2008
Karsten Hopp 0f7bbd
***************
Karsten Hopp 0f7bbd
*** 5059,5064 ****
Karsten Hopp 0f7bbd
--- 5059,5065 ----
Karsten Hopp 0f7bbd
  
Karsten Hopp 0f7bbd
  	    if (did_sub)
Karsten Hopp 0f7bbd
  		++sub_nlines;
Karsten Hopp 0f7bbd
+ 	    vim_free(new_start);	/* for when substitute was cancelled */
Karsten Hopp 0f7bbd
  	    vim_free(sub_firstline);	/* free the copy of the original line */
Karsten Hopp 0f7bbd
  	    sub_firstline = NULL;
Karsten Hopp 0f7bbd
  	}
Karsten Hopp 0f7bbd
*** ../vim-7.2.017/src/version.c	Sun Sep 14 15:57:54 2008
Karsten Hopp 0f7bbd
--- src/version.c	Sun Sep 14 21:38:25 2008
Karsten Hopp 0f7bbd
***************
Karsten Hopp 0f7bbd
*** 678,679 ****
Karsten Hopp 0f7bbd
--- 678,681 ----
Karsten Hopp 0f7bbd
  {   /* Add new patch number below this line */
Karsten Hopp 0f7bbd
+ /**/
Karsten Hopp 0f7bbd
+     18,
Karsten Hopp 0f7bbd
  /**/
Karsten Hopp 0f7bbd
Karsten Hopp 0f7bbd
-- 
Karsten Hopp 0f7bbd
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 0f7bbd
55. You ask your doctor to implant a gig in your brain.
Karsten Hopp 0f7bbd
Karsten Hopp 0f7bbd
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 0f7bbd
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 0f7bbd
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 0f7bbd
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///