Patch 8.2.2023
Problem: Vim: memory leak when :execute fails.
Solution: Clear the growarray.
Files: src/vim9execute.c
*** ../vim-8.2.2022/src/vim9execute.c 2020-11-20 19:26:45.081207924 +0100
--- src/vim9execute.c 2020-11-21 11:43:05.022528437 +0100
***************
*** 1200,1206 ****
--- 1200,1209 ----
}
ectx.ec_stack.ga_len -= count;
if (failed)
+ {
+ ga_clear(&ga);
goto on_error;
+ }
if (ga.ga_data != NULL)
{
***************
*** 1209,1215 ****
--- 1212,1221 ----
SOURCING_LNUM = iptr->isn_lnum;
do_cmdline_cmd((char_u *)ga.ga_data);
if (did_emsg)
+ {
+ ga_clear(&ga);
goto on_error;
+ }
}
else
{
*** ../vim-8.2.2022/src/version.c 2020-11-20 21:06:56.699112617 +0100
--- src/version.c 2020-11-21 11:43:41.762370365 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2023,
/**/
--
Facepalm statement #4: "3000 year old graves? That's not possible, it's only
2014!"
/// 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/202011211046.0ALAkLOs877500%40masaka.moolenaar.net.