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:
@@ -11931,7 +11931,11 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
|
|||||||
}
|
}
|
||||||
else
|
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;
|
rettv->vval.v_number = timer->tr_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -763,6 +763,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2129,
|
||||||
/**/
|
/**/
|
||||||
2128,
|
2128,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user