mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 7.4.2045
Problem: Memory leak when using a function callback. Solution: Don't save the function name when it's in the partial.
This commit is contained in:
@@ -1122,7 +1122,12 @@ set_callback(
|
|||||||
{
|
{
|
||||||
free_callback(*cbp, *pp);
|
free_callback(*cbp, *pp);
|
||||||
if (callback != NULL && *callback != NUL)
|
if (callback != NULL && *callback != NUL)
|
||||||
*cbp = vim_strsave(callback);
|
{
|
||||||
|
if (partial != NULL)
|
||||||
|
*cbp = partial->pt_name;
|
||||||
|
else
|
||||||
|
*cbp = vim_strsave(callback);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
*cbp = NULL;
|
*cbp = NULL;
|
||||||
*pp = partial;
|
*pp = partial;
|
||||||
|
@@ -758,6 +758,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 */
|
||||||
|
/**/
|
||||||
|
2045,
|
||||||
/**/
|
/**/
|
||||||
2044,
|
2044,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user