mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user