changeset 24416:1754622e1bce v8.2.2748

patch 8.2.2748: Vim9: memory leak when calling :def function fails Commit: https://github.com/vim/vim/commit/c4297697761230489a025b3e39b992cca845b1b3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 10 20:46:48 2021 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Apr 2021 21:00:04 +0200
parents 5a28c3b69079
children 160f0f84ceec
files src/version.c src/vim9execute.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2748,
+/**/
     2747,
 /**/
     2746,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -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.