commit | 955347cc7e78352a5d49540573ae958ad45e6386 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Oct 19 23:01:46 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Oct 19 23:01:46 2020 +0200 |
tree | 149f66c1554417c4686a411f683a91eb74517a50 | |
parent | 9a13e185e5de95b150555134b34030bd47c4e22b [diff] [blame] |
patch 8.2.1869: Vim9: memory leak when using add() Problem: Vim9: memory leak when using add(). Solution: Free the added item.
diff --git a/src/vim9execute.c b/src/vim9execute.c index 7a5871a..115212f 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c
@@ -2308,6 +2308,7 @@ } if (list_append_tv(l, tv2) == FAIL) goto failed; + clear_tv(tv2); --ectx.ec_stack.ga_len; } break;