forked from aniani/vim
patch 8.2.2748: Vim9: memory leak when calling :def function fails
Problem: Vim9: memory leak when calling :def function fails. Solution: Jump to failed_early instead of returning.
This commit is contained in:
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2748,
|
||||||
/**/
|
/**/
|
||||||
2747,
|
2747,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1343,7 +1343,7 @@ call_def_function(
|
|||||||
emsg(_(e_one_argument_too_many));
|
emsg(_(e_one_argument_too_many));
|
||||||
else
|
else
|
||||||
semsg(_(e_nr_arguments_too_many), idx);
|
semsg(_(e_nr_arguments_too_many), idx);
|
||||||
return FAIL;
|
goto failed_early;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put arguments on the stack, but no more than what the function expects.
|
// Put arguments on the stack, but no more than what the function expects.
|
||||||
|
Reference in New Issue
Block a user