Patch 8.2.2205
Problem: Vim9: memory leak when parsing lambda fails.
Solution: Clear growarrays.
Files: src/userfunc.c
*** ../vim-8.2.2204/src/userfunc.c 2020-12-24 15:13:35.850860411 +0100
--- src/userfunc.c 2020-12-24 16:04:42.688125597 +0100
***************
*** 523,529 ****
--- 523,533 ----
types_optional ? &argtypes : NULL, types_optional,
NULL, NULL, TRUE, NULL, NULL);
if (ret == FAIL || skip_arrow(s, equal_arrow) == NULL)
+ {
+ if (types_optional)
+ ga_clear_strings(&argtypes);
return NOTDONE;
+ }
// Parse the arguments again.
if (evaluate)
***************
*** 535,541 ****
--- 539,549 ----
types_optional ? &argtypes : NULL, types_optional,
&varargs, NULL, FALSE, NULL, NULL);
if (ret == FAIL || (*arg = skip_arrow(*arg, equal_arrow)) == NULL)
+ {
+ if (types_optional)
+ ga_clear_strings(&argtypes);
return NOTDONE;
+ }
// Set up a flag for checking local variables and arguments.
if (evaluate)
*** ../vim-8.2.2204/src/version.c 2020-12-24 15:13:35.850860411 +0100
--- src/version.c 2020-12-24 15:43:26.016611665 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2205,
/**/
--
hundred-and-one symptoms of being an internet addict:
27. You refer to your age as 3.x.
/// 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/202012241506.0BOF6VlC3222169%40masaka.moolenaar.net.