lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.243
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=UTF-8
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.243
81c2858
Problem:    Memory leak when using :vimgrep and resizing. (Dominique Pelle)
81c2858
Solution:   Free memory for aucmd_win when resizing and don't allocate it
81c2858
	    twice.
81c2858
Files:	    src/screen.c
81c2858
81c2858
81c2858
*** ../vim-7.2.242/src/screen.c	2009-06-16 17:22:38.000000000 +0200
81c2858
--- src/screen.c	2009-07-29 15:59:37.000000000 +0200
81c2858
***************
81c2858
*** 7467,7472 ****
81c2858
--- 7467,7476 ----
81c2858
       */
81c2858
      FOR_ALL_TAB_WINDOWS(tp, wp)
81c2858
  	win_free_lsize(wp);
81c2858
+ #ifdef FEAT_AUTOCMD
81c2858
+     if (aucmd_win != NULL)
81c2858
+ 	win_free_lsize(aucmd_win);
81c2858
+ #endif
81c2858
  
81c2858
      new_ScreenLines = (schar_T *)lalloc((long_u)(
81c2858
  			      (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
81c2858
***************
81c2858
*** 7504,7510 ****
81c2858
  	}
81c2858
      }
81c2858
  #ifdef FEAT_AUTOCMD
81c2858
!     if (aucmd_win != NULL && win_alloc_lines(aucmd_win) == FAIL)
81c2858
  	outofmem = TRUE;
81c2858
  #endif
81c2858
  #ifdef FEAT_WINDOWS
81c2858
--- 7508,7515 ----
81c2858
  	}
81c2858
      }
81c2858
  #ifdef FEAT_AUTOCMD
81c2858
!     if (aucmd_win != NULL && aucmd_win->w_lines == NULL
81c2858
! 					&& win_alloc_lines(aucmd_win) == FAIL)
81c2858
  	outofmem = TRUE;
81c2858
  #endif
81c2858
  #ifdef FEAT_WINDOWS
81c2858
*** ../vim-7.2.242/src/version.c	2009-07-29 15:41:32.000000000 +0200
81c2858
--- src/version.c	2009-07-29 16:07:47.000000000 +0200
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     243,
81c2858
  /**/
81c2858
81c2858
-- 
81c2858
hundred-and-one symptoms of being an internet addict:
81c2858
118. You are on a first-name basis with your ISP's staff.
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///