Patch 8.2.2882

4 views
Skip to first unread message

Bram Moolenaar

unread,
May 24, 2021, 9:46:02 AM5/24/21
to vim...@googlegroups.com

Patch 8.2.2882
Problem: Vim9: memory leak when lambda has an error.
Solution: Free the list of argument types on failure.
Files: src/userfunc.c


*** ../vim-8.2.2881/src/userfunc.c 2021-05-18 15:09:13.963782700 +0200
--- src/userfunc.c 2021-05-24 15:39:02.967238634 +0200
***************
*** 1394,1400 ****
--- 1394,1404 ----
ga_clear_strings(&newlines);
ga_clear_strings(&default_args);
if (types_optional)
+ {
ga_clear_strings(&argtypes);
+ if (fp != NULL)
+ vim_free(fp->uf_arg_types);
+ }
vim_free(fp);
vim_free(pt);
if (evalarg != NULL && evalarg->eval_tofree == NULL)
*** ../vim-8.2.2881/src/version.c 2021-05-24 15:15:41.779049851 +0200
--- src/version.c 2021-05-24 15:40:00.143079812 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2882,
/**/

--
Some say the world will end in fire; some say in segfaults.
I say it will end in a curly bracket.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages