Karsten Hopp ebfbc4
To: vim_dev@googlegroups.com
Karsten Hopp ebfbc4
Subject: Patch 7.3.108
Karsten Hopp ebfbc4
Fcc: outbox
Karsten Hopp ebfbc4
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp ebfbc4
Mime-Version: 1.0
Karsten Hopp ebfbc4
Content-Type: text/plain; charset=UTF-8
Karsten Hopp ebfbc4
Content-Transfer-Encoding: 8bit
Karsten Hopp ebfbc4
------------
Karsten Hopp ebfbc4
Karsten Hopp ebfbc4
Patch 7.3.108
Karsten Hopp ebfbc4
Problem:    Useless check for NULL when calling vim_free().
Karsten Hopp ebfbc4
Solution:   Remove the check. (Dominique Pelle)
Karsten Hopp ebfbc4
Files:	    src/eval.c, src/ex_cmds.c, src/os_win32.c
Karsten Hopp ebfbc4
Karsten Hopp ebfbc4
Karsten Hopp ebfbc4
*** ../vim-7.3.107/src/eval.c	2011-01-22 01:13:33.000000000 +0100
Karsten Hopp ebfbc4
--- src/eval.c	2011-01-30 21:37:53.000000000 +0100
Karsten Hopp ebfbc4
***************
Karsten Hopp ebfbc4
*** 5106,5114 ****
Karsten Hopp ebfbc4
  	    else
Karsten Hopp ebfbc4
  		ret = OK;
Karsten Hopp ebfbc4
  	}
Karsten Hopp ebfbc4
! 
Karsten Hopp ebfbc4
! 	if (alias != NULL)
Karsten Hopp ebfbc4
! 	    vim_free(alias);
Karsten Hopp ebfbc4
      }
Karsten Hopp ebfbc4
  
Karsten Hopp ebfbc4
      *arg = skipwhite(*arg);
Karsten Hopp ebfbc4
--- 5106,5112 ----
Karsten Hopp ebfbc4
  	    else
Karsten Hopp ebfbc4
  		ret = OK;
Karsten Hopp ebfbc4
  	}
Karsten Hopp ebfbc4
! 	vim_free(alias);
Karsten Hopp ebfbc4
      }
Karsten Hopp ebfbc4
  
Karsten Hopp ebfbc4
      *arg = skipwhite(*arg);
Karsten Hopp ebfbc4
***************
Karsten Hopp ebfbc4
*** 19807,19813 ****
Karsten Hopp ebfbc4
  	    EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
Karsten Hopp ebfbc4
  	    return;
Karsten Hopp ebfbc4
  	}
Karsten Hopp ebfbc4
! 	/* Don't allow hiding a function.  When "v" is not NULL we migth be
Karsten Hopp ebfbc4
  	 * assigning another function to the same var, the type is checked
Karsten Hopp ebfbc4
  	 * below. */
Karsten Hopp ebfbc4
  	if (v == NULL && function_exists(name))
Karsten Hopp ebfbc4
--- 19805,19811 ----
Karsten Hopp ebfbc4
  	    EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
Karsten Hopp ebfbc4
  	    return;
Karsten Hopp ebfbc4
  	}
Karsten Hopp ebfbc4
! 	/* Don't allow hiding a function.  When "v" is not NULL we might be
Karsten Hopp ebfbc4
  	 * assigning another function to the same var, the type is checked
Karsten Hopp ebfbc4
  	 * below. */
Karsten Hopp ebfbc4
  	if (v == NULL && function_exists(name))
Karsten Hopp ebfbc4
*** ../vim-7.3.107/src/ex_cmds.c	2010-12-17 18:06:00.000000000 +0100
Karsten Hopp ebfbc4
--- src/ex_cmds.c	2011-01-30 21:37:53.000000000 +0100
Karsten Hopp ebfbc4
***************
Karsten Hopp ebfbc4
*** 5412,5418 ****
Karsten Hopp ebfbc4
      vir_T	*virp;
Karsten Hopp ebfbc4
      int		force;
Karsten Hopp ebfbc4
  {
Karsten Hopp ebfbc4
!     if (old_sub != NULL && force)
Karsten Hopp ebfbc4
  	vim_free(old_sub);
Karsten Hopp ebfbc4
      if (force || old_sub == NULL)
Karsten Hopp ebfbc4
  	old_sub = viminfo_readstring(virp, 1, TRUE);
Karsten Hopp ebfbc4
--- 5412,5418 ----
Karsten Hopp ebfbc4
      vir_T	*virp;
Karsten Hopp ebfbc4
      int		force;
Karsten Hopp ebfbc4
  {
Karsten Hopp ebfbc4
!     if (force)
Karsten Hopp ebfbc4
  	vim_free(old_sub);
Karsten Hopp ebfbc4
      if (force || old_sub == NULL)
Karsten Hopp ebfbc4
  	old_sub = viminfo_readstring(virp, 1, TRUE);
Karsten Hopp ebfbc4
*** ../vim-7.3.107/src/os_win32.c	2010-12-17 20:23:56.000000000 +0100
Karsten Hopp ebfbc4
--- src/os_win32.c	2011-01-30 21:37:53.000000000 +0100
Karsten Hopp ebfbc4
***************
Karsten Hopp ebfbc4
*** 1886,1893 ****
Karsten Hopp ebfbc4
  	cb->BufferSize.X = cb->Info.dwSize.X;
Karsten Hopp ebfbc4
  	cb->BufferSize.Y = cb->Info.dwSize.Y;
Karsten Hopp ebfbc4
  	NumCells = cb->BufferSize.X * cb->BufferSize.Y;
Karsten Hopp ebfbc4
! 	if (cb->Buffer != NULL)
Karsten Hopp ebfbc4
! 	    vim_free(cb->Buffer);
Karsten Hopp ebfbc4
  	cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO));
Karsten Hopp ebfbc4
  	if (cb->Buffer == NULL)
Karsten Hopp ebfbc4
  	    return FALSE;
Karsten Hopp ebfbc4
--- 1886,1892 ----
Karsten Hopp ebfbc4
  	cb->BufferSize.X = cb->Info.dwSize.X;
Karsten Hopp ebfbc4
  	cb->BufferSize.Y = cb->Info.dwSize.Y;
Karsten Hopp ebfbc4
  	NumCells = cb->BufferSize.X * cb->BufferSize.Y;
Karsten Hopp ebfbc4
! 	vim_free(cb->Buffer);
Karsten Hopp ebfbc4
  	cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO));
Karsten Hopp ebfbc4
  	if (cb->Buffer == NULL)
Karsten Hopp ebfbc4
  	    return FALSE;
Karsten Hopp ebfbc4
*** ../vim-7.3.107/src/version.c	2011-01-22 21:25:07.000000000 +0100
Karsten Hopp ebfbc4
--- src/version.c	2011-02-01 13:47:07.000000000 +0100
Karsten Hopp ebfbc4
***************
Karsten Hopp ebfbc4
*** 716,717 ****
Karsten Hopp ebfbc4
--- 716,719 ----
Karsten Hopp ebfbc4
  {   /* Add new patch number below this line */
Karsten Hopp ebfbc4
+ /**/
Karsten Hopp ebfbc4
+     108,
Karsten Hopp ebfbc4
  /**/
Karsten Hopp ebfbc4
Karsten Hopp ebfbc4
-- 
Karsten Hopp ebfbc4
hundred-and-one symptoms of being an internet addict:
Karsten Hopp ebfbc4
173. You keep tracking down the email addresses of all your friends
Karsten Hopp ebfbc4
     (even childhood friends).
Karsten Hopp ebfbc4
Karsten Hopp ebfbc4
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp ebfbc4
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp ebfbc4
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp ebfbc4
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///