diff src/evalfunc.c @ 10178:776d0aef1d80 v7.4.2359

commit https://github.com/vim/vim/commit/26fe0d56912e42c2b16a61b2480e19ba569aee98 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 10 14:27:30 2016 +0200 patch 7.4.2359 Problem: Memory leak in timer_start(). Solution: Check the right field to be NULL.
author Christian Brabandt <cb@256bit.org>
date Sat, 10 Sep 2016 14:30:07 +0200
parents 3db463d4df25
children 9415453b7bbd
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -12429,7 +12429,7 @@ f_timer_start(typval_T *argvars, typval_
 	free_callback(callback, partial);
     else
     {
-	if (timer->tr_partial == NULL)
+	if (partial == NULL)
 	    timer->tr_callback = vim_strsave(callback);
 	else
 	    /* pointer into the partial */