Patch 8.2.2101
Problem: Vim9: memory leak when literal dict has an error and when an
expression is not complete.
Solution: Clear the typval and the growarray.
Files: src/dict.c, src/vim9compile.c
*** ../vim-8.2.2100/src/dict.c 2020-12-04 19:11:53.877306973 +0100
--- src/dict.c 2020-12-06 15:57:20.786976378 +0100
***************
*** 929,934 ****
--- 929,935 ----
if (**arg != ']')
{
emsg(_(e_missing_matching_bracket_after_dict_key));
+ clear_tv(&tvkey);
return FAIL;
}
++*arg;
*** ../vim-8.2.2100/src/vim9compile.c 2020-12-06 14:37:04.717124932 +0100
--- src/vim9compile.c 2020-12-06 15:58:58.706661673 +0100
***************
*** 4392,4398 ****
--- 4392,4401 ----
// eval the next expression
*arg = skipwhite(p + 2);
if (may_get_next_line_error(p + 2, arg, cctx) == FAIL)
+ {
+ ga_clear(&end_ga);
return FAIL;
+ }
if ((opchar == '|' ? compile_expr3(arg, cctx, ppconst)
: compile_expr4(arg, cctx, ppconst)) == FAIL)
*** ../vim-8.2.2100/src/version.c 2020-12-06 15:03:14.821379868 +0100
--- src/version.c 2020-12-06 15:58:22.954776349 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2101,
/**/
--
John: When I'm playing tennis with friends I always get carried away
George: You hurt your foot each time?
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202012061507.0B6F7uaU1104049%40masaka.moolenaar.net.