562eba5
To: vim-dev@vim.org
562eba5
Subject: Patch 7.2.034
562eba5
Fcc: outbox
562eba5
From: Bram Moolenaar <Bram@moolenaar.net>
562eba5
Mime-Version: 1.0
562eba5
Content-Type: text/plain; charset=ISO-8859-1
562eba5
Content-Transfer-Encoding: 8bit
562eba5
------------
562eba5
562eba5
Patch 7.2.034
562eba5
Problem:    Memory leak in spell info when deleting buffer.
562eba5
Solution:   Free the memory. (Dominique Pelle)
562eba5
Files:	    src/buffer.c
562eba5
562eba5
562eba5
*** ../vim-7.2.033/src/buffer.c	Mon Sep  1 17:32:40 2008
562eba5
--- src/buffer.c	Wed Nov 12 11:21:49 2008
562eba5
***************
562eba5
*** 647,652 ****
562eba5
--- 647,655 ----
562eba5
      vim_free(buf->b_start_fenc);
562eba5
      buf->b_start_fenc = NULL;
562eba5
  #endif
562eba5
+ #ifdef FEAT_SPELL
562eba5
+     ga_clear(&buf->b_langp);
562eba5
+ #endif
562eba5
  }
562eba5
  
562eba5
  /*
562eba5
***************
562eba5
*** 1237,1243 ****
562eba5
  	 * "buf" if one exists */
562eba5
  	if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
562eba5
  	    return OK;
562eba5
! 	/* If 'switchbuf' contians "usetab": jump to first window in any tab
562eba5
  	 * page containing "buf" if one exists */
562eba5
  	if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
562eba5
  	    return OK;
562eba5
--- 1240,1246 ----
562eba5
  	 * "buf" if one exists */
562eba5
  	if ((swb_flags & SWB_USEOPEN) && buf_jump_open_win(buf))
562eba5
  	    return OK;
562eba5
! 	/* If 'switchbuf' contains "usetab": jump to first window in any tab
562eba5
  	 * page containing "buf" if one exists */
562eba5
  	if ((swb_flags & SWB_USETAB) && buf_jump_open_tab(buf))
562eba5
  	    return OK;
562eba5
***************
562eba5
*** 3964,3970 ****
562eba5
      width = vim_strsize(out);
562eba5
      if (maxwidth > 0 && width > maxwidth)
562eba5
      {
562eba5
! 	/* Result is too long, must trunctate somewhere. */
562eba5
  	l = 0;
562eba5
  	if (itemcnt == 0)
562eba5
  	    s = out;
562eba5
--- 3967,3973 ----
562eba5
      width = vim_strsize(out);
562eba5
      if (maxwidth > 0 && width > maxwidth)
562eba5
      {
562eba5
! 	/* Result is too long, must truncate somewhere. */
562eba5
  	l = 0;
562eba5
  	if (itemcnt == 0)
562eba5
  	    s = out;
562eba5
*** ../vim-7.2.033/src/version.c	Tue Nov 11 21:55:29 2008
562eba5
--- src/version.c	Wed Nov 12 12:51:21 2008
562eba5
***************
562eba5
*** 678,679 ****
562eba5
--- 678,681 ----
562eba5
  {   /* Add new patch number below this line */
562eba5
+ /**/
562eba5
+     34,
562eba5
  /**/
562eba5
562eba5
-- 
562eba5
hundred-and-one symptoms of being an internet addict:
562eba5
236. You start saving URL's in your digital watch.
562eba5
562eba5
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
562eba5
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
562eba5
\\\        download, build and distribute -- http://www.A-A-P.org        ///
562eba5
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///