Karsten Hopp 12e868
To: vim-dev@vim.org
Karsten Hopp 12e868
Subject: Patch 7.2.135
Karsten Hopp 12e868
Fcc: outbox
Karsten Hopp 12e868
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 12e868
Mime-Version: 1.0
Karsten Hopp 12e868
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 12e868
Content-Transfer-Encoding: 8bit
Karsten Hopp 12e868
------------
Karsten Hopp 12e868
Karsten Hopp 12e868
Patch 7.2.135
Karsten Hopp 12e868
Problem:    Memory leak when redefining user command with complete argument.
Karsten Hopp 12e868
Solution:   Free the old complete argument. (Dominique Pelle)
Karsten Hopp 12e868
Files:	    src/ex_docmd.c
Karsten Hopp 12e868
Karsten Hopp 12e868
Karsten Hopp 12e868
*** ../vim-7.2.134/src/ex_docmd.c	Sun Mar  1 02:43:50 2009
Karsten Hopp 12e868
--- src/ex_docmd.c	Wed Mar 11 11:13:31 2009
Karsten Hopp 12e868
***************
Karsten Hopp 12e868
*** 5124,5130 ****
Karsten Hopp 12e868
  	    }
Karsten Hopp 12e868
  
Karsten Hopp 12e868
  	    vim_free(cmd->uc_rep);
Karsten Hopp 12e868
! 	    cmd->uc_rep = 0;
Karsten Hopp 12e868
  	    break;
Karsten Hopp 12e868
  	}
Karsten Hopp 12e868
  
Karsten Hopp 12e868
--- 5124,5134 ----
Karsten Hopp 12e868
  	    }
Karsten Hopp 12e868
  
Karsten Hopp 12e868
  	    vim_free(cmd->uc_rep);
Karsten Hopp 12e868
! 	    cmd->uc_rep = NULL;
Karsten Hopp 12e868
! #if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
Karsten Hopp 12e868
! 	    vim_free(cmd->uc_compl_arg);
Karsten Hopp 12e868
! 	    cmd->uc_compl_arg = NULL;
Karsten Hopp 12e868
! #endif
Karsten Hopp 12e868
  	    break;
Karsten Hopp 12e868
  	}
Karsten Hopp 12e868
  
Karsten Hopp 12e868
***************
Karsten Hopp 12e868
*** 5941,5947 ****
Karsten Hopp 12e868
      for (;;)
Karsten Hopp 12e868
      {
Karsten Hopp 12e868
  	p = cmd->uc_rep;    /* source */
Karsten Hopp 12e868
! 	q = buf;	    /* destinateion */
Karsten Hopp 12e868
  	totlen = 0;
Karsten Hopp 12e868
  
Karsten Hopp 12e868
  	for (;;)
Karsten Hopp 12e868
--- 5945,5951 ----
Karsten Hopp 12e868
      for (;;)
Karsten Hopp 12e868
      {
Karsten Hopp 12e868
  	p = cmd->uc_rep;    /* source */
Karsten Hopp 12e868
! 	q = buf;	    /* destination */
Karsten Hopp 12e868
  	totlen = 0;
Karsten Hopp 12e868
  
Karsten Hopp 12e868
  	for (;;)
Karsten Hopp 12e868
***************
Karsten Hopp 12e868
*** 7846,7851 ****
Karsten Hopp 12e868
--- 7850,7858 ----
Karsten Hopp 12e868
  {
Karsten Hopp 12e868
      vim_free(prev_dir);
Karsten Hopp 12e868
      prev_dir = NULL;
Karsten Hopp 12e868
+ 
Karsten Hopp 12e868
+     vim_free(globaldir);
Karsten Hopp 12e868
+     globaldir = NULL;
Karsten Hopp 12e868
  }
Karsten Hopp 12e868
  #endif
Karsten Hopp 12e868
  
Karsten Hopp 12e868
*** ../vim-7.2.134/src/version.c	Wed Mar 11 13:09:30 2009
Karsten Hopp 12e868
--- src/version.c	Wed Mar 11 15:06:23 2009
Karsten Hopp 12e868
***************
Karsten Hopp 12e868
*** 678,679 ****
Karsten Hopp 12e868
--- 678,681 ----
Karsten Hopp 12e868
  {   /* Add new patch number below this line */
Karsten Hopp 12e868
+ /**/
Karsten Hopp 12e868
+     135,
Karsten Hopp 12e868
  /**/
Karsten Hopp 12e868
Karsten Hopp 12e868
-- 
Karsten Hopp 12e868
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 12e868
194. Your business cards contain your e-mail and home page address.
Karsten Hopp 12e868
Karsten Hopp 12e868
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 12e868
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 12e868
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 12e868
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///