To: vim_dev@googlegroups.com
Subject: Patch 7.3.108
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.108
Problem:    Useless check for NULL when calling vim_free().
Solution:   Remove the check. (Dominique Pelle)
Files:	    src/eval.c, src/ex_cmds.c, src/os_win32.c


*** ../vim-7.3.107/src/eval.c	2011-01-22 01:13:33.000000000 +0100
--- src/eval.c	2011-01-30 21:37:53.000000000 +0100
***************
*** 5106,5114 ****
  	    else
  		ret = OK;
  	}
! 
! 	if (alias != NULL)
! 	    vim_free(alias);
      }
  
      *arg = skipwhite(*arg);
--- 5106,5112 ----
  	    else
  		ret = OK;
  	}
! 	vim_free(alias);
      }
  
      *arg = skipwhite(*arg);
***************
*** 19807,19813 ****
  	    EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
  	    return;
  	}
! 	/* Don't allow hiding a function.  When "v" is not NULL we migth be
  	 * assigning another function to the same var, the type is checked
  	 * below. */
  	if (v == NULL && function_exists(name))
--- 19805,19811 ----
  	    EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
  	    return;
  	}
! 	/* Don't allow hiding a function.  When "v" is not NULL we might be
  	 * assigning another function to the same var, the type is checked
  	 * below. */
  	if (v == NULL && function_exists(name))
*** ../vim-7.3.107/src/ex_cmds.c	2010-12-17 18:06:00.000000000 +0100
--- src/ex_cmds.c	2011-01-30 21:37:53.000000000 +0100
***************
*** 5412,5418 ****
      vir_T	*virp;
      int		force;
  {
!     if (old_sub != NULL && force)
  	vim_free(old_sub);
      if (force || old_sub == NULL)
  	old_sub = viminfo_readstring(virp, 1, TRUE);
--- 5412,5418 ----
      vir_T	*virp;
      int		force;
  {
!     if (force)
  	vim_free(old_sub);
      if (force || old_sub == NULL)
  	old_sub = viminfo_readstring(virp, 1, TRUE);
*** ../vim-7.3.107/src/os_win32.c	2010-12-17 20:23:56.000000000 +0100
--- src/os_win32.c	2011-01-30 21:37:53.000000000 +0100
***************
*** 1886,1893 ****
  	cb->BufferSize.X = cb->Info.dwSize.X;
  	cb->BufferSize.Y = cb->Info.dwSize.Y;
  	NumCells = cb->BufferSize.X * cb->BufferSize.Y;
! 	if (cb->Buffer != NULL)
! 	    vim_free(cb->Buffer);
  	cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO));
  	if (cb->Buffer == NULL)
  	    return FALSE;
--- 1886,1892 ----
  	cb->BufferSize.X = cb->Info.dwSize.X;
  	cb->BufferSize.Y = cb->Info.dwSize.Y;
  	NumCells = cb->BufferSize.X * cb->BufferSize.Y;
! 	vim_free(cb->Buffer);
  	cb->Buffer = (PCHAR_INFO)alloc(NumCells * sizeof(CHAR_INFO));
  	if (cb->Buffer == NULL)
  	    return FALSE;
*** ../vim-7.3.107/src/version.c	2011-01-22 21:25:07.000000000 +0100
--- src/version.c	2011-02-01 13:47:07.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     108,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
173. You keep tracking down the email addresses of all your friends
     (even childhood friends).

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
