changeset 22641:6dce588f7a46 v8.2.1869

patch 8.2.1869: Vim9: memory leak when using add() Commit: https://github.com/vim/vim/commit/955347cc7e78352a5d49540573ae958ad45e6386 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 19 23:01:46 2020 +0200 patch 8.2.1869: Vim9: memory leak when using add() Problem: Vim9: memory leak when using add(). Solution: Free the added item.
author Bram Moolenaar <Bram@vim.org>
date Mon, 19 Oct 2020 23:15:03 +0200
parents e2a0b8084d58
children 6869968c6587
files src/version.c src/vim9execute.c
diffstat 2 files changed, 3 insertions(+), 0 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 */
 /**/
+    1869,
+/**/
     1868,
 /**/
     1867,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -2308,6 +2308,7 @@ call_def_function(
 		    }
 		    if (list_append_tv(l, tv2) == FAIL)
 			goto failed;
+		    clear_tv(tv2);
 		    --ectx.ec_stack.ga_len;
 		}
 		break;