mirror of https://github.com/vim/vim.git
patch 8.2.1733: Vim9: memory leaks when using nested function
Problem: Vim9: memory leaks when using nested function. Solution: Free function when compilation fails.
This commit is contained in:
parent
6bf1b52ba2
commit
4ee711f213
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1733,
|
||||
/**/
|
||||
1732,
|
||||
/**/
|
||||
|
|
|
@ -4408,7 +4408,10 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx)
|
|||
return eap->skip ? (char_u *)"" : NULL;
|
||||
if (ufunc->uf_def_status == UF_TO_BE_COMPILED
|
||||
&& compile_def_function(ufunc, TRUE, cctx) == FAIL)
|
||||
{
|
||||
func_ptr_unref(ufunc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (is_global)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue