0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.1869: Vim9: memory leak when using add()

Problem:    Vim9: memory leak when using add().
Solution:   Free the added item.
This commit is contained in:
Bram Moolenaar
2020-10-19 23:01:46 +02:00
parent 9a13e185e5
commit 955347cc7e
2 changed files with 3 additions and 0 deletions

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1869,
/**/ /**/
1868, 1868,
/**/ /**/

View File

@@ -2308,6 +2308,7 @@ call_def_function(
} }
if (list_append_tv(l, tv2) == FAIL) if (list_append_tv(l, tv2) == FAIL)
goto failed; goto failed;
clear_tv(tv2);
--ectx.ec_stack.ga_len; --ectx.ec_stack.ga_len;
} }
break; break;