1
0
forked from aniani/vim

patch 7.4.2129

Problem:    Memory leak when using timer_start(). (Dominique Pelle)
Solution:   Don't copy the callback when using a partial.
This commit is contained in:
Bram Moolenaar
2016-07-30 22:32:11 +02:00
parent 1e2258297b
commit 3ab14355ed
2 changed files with 7 additions and 1 deletions

View File

@@ -11931,7 +11931,11 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
}
else
{
timer->tr_callback = vim_strsave(callback);
if (timer->tr_partial == NULL)
timer->tr_callback = vim_strsave(callback);
else
/* pointer into the partial */
timer->tr_callback = callback;
rettv->vval.v_number = timer->tr_id;
}
}

View File

@@ -763,6 +763,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2129,
/**/
2128,
/**/