summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-19 23:01:46 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-19 23:01:46 +0200
commit955347cc7e78352a5d49540573ae958ad45e6386 (patch)
tree149f66c1554417c4686a411f683a91eb74517a50 /src
parent9a13e185e5de95b150555134b34030bd47c4e22b (diff)
downloadvim-git-955347cc7e78352a5d49540573ae958ad45e6386.tar.gz
patch 8.2.1869: Vim9: memory leak when using add()v8.2.1869
Problem: Vim9: memory leak when using add(). Solution: Free the added item.
Diffstat (limited to 'src')
-rw-r--r--src/version.c2
-rw-r--r--src/vim9execute.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c
index 90ab88ab6..a0bc13546 100644
--- 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,
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 7a5871a7f..115212fdc 100644
--- 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;