Patch 8.2.3241
Problem: Vim9: memory leak when function reports an error.
Solution: Clear the return value.
Files: src/userfunc.c
*** ../vim-8.2.3240/src/userfunc.c 2021-07-28 19:34:10.559082899 +0200
--- src/userfunc.c 2021-07-28 22:19:16.536867041 +0200
***************
*** 1691,1699 ****
--- 1691,1702 ----
ret = call_func(name, len, rettv, argcount, argvars, funcexe);
if (in_vim9script() && did_emsg > did_emsg_before)
+ {
// An error in a builtin function does not return FAIL, but we do
// want to abort further processing if an error was given.
ret = FAIL;
+ clear_tv(rettv);
+ }
funcargs.ga_len -= i;
}
*** ../vim-8.2.3240/src/version.c 2021-07-28 21:48:55.841029431 +0200
--- src/version.c 2021-07-28 22:21:00.524652250 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3241,
/**/
--
Edison's greatest achievement came in 1879, when he invented the
electric company. Edison's design was a brilliant adaptation of the
simple electrical circuit: the electric company sends electricity
through a wire to a customer, then immediately gets the electricity
back through another wire
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/202107282021.16SKLop51960208%40masaka.moolenaar.net.