1
0
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:
Bram Moolenaar
2021-04-10 20:46:48 +02:00
parent bb8a7ce0a1
commit c429769776
2 changed files with 3 additions and 1 deletions

View File

@@ -1343,7 +1343,7 @@ call_def_function(
emsg(_(e_one_argument_too_many));
else
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.