mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2882: Vim9: memory leak when lambda has an error
Problem: Vim9: memory leak when lambda has an error. Solution: Free the list of argument types on failure.
This commit is contained in:
@@ -1394,7 +1394,11 @@ errret:
|
|||||||
ga_clear_strings(&newlines);
|
ga_clear_strings(&newlines);
|
||||||
ga_clear_strings(&default_args);
|
ga_clear_strings(&default_args);
|
||||||
if (types_optional)
|
if (types_optional)
|
||||||
|
{
|
||||||
ga_clear_strings(&argtypes);
|
ga_clear_strings(&argtypes);
|
||||||
|
if (fp != NULL)
|
||||||
|
vim_free(fp->uf_arg_types);
|
||||||
|
}
|
||||||
vim_free(fp);
|
vim_free(fp);
|
||||||
vim_free(pt);
|
vim_free(pt);
|
||||||
if (evalarg != NULL && evalarg->eval_tofree == NULL)
|
if (evalarg != NULL && evalarg->eval_tofree == NULL)
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2882,
|
||||||
/**/
|
/**/
|
||||||
2881,
|
2881,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user