Patch 8.2.1971
Problem: Memory leak when map() fails.
Solution: Clear the typval.
Files: src/list.c
*** ../vim-8.2.1970/src/list.c 2020-11-09 18:31:30.548791857 +0100
--- src/list.c 2020-11-10 11:42:03.022103951 +0100
***************
*** 2185,2192 ****
nli = li->li_next;
set_vim_var_nr(VV_KEY, idx);
if (filter_map_one(&li->li_tv, expr, filtermap,
! &newtv, &rem) == FAIL || did_emsg)
break;
if (filtermap == FILTERMAP_MAP)
{
// map(): replace the list item value
--- 2185,2197 ----
nli = li->li_next;
set_vim_var_nr(VV_KEY, idx);
if (filter_map_one(&li->li_tv, expr, filtermap,
! &newtv, &rem) == FAIL)
break;
+ if (did_emsg)
+ {
+ clear_tv(&newtv);
+ break;
+ }
if (filtermap == FILTERMAP_MAP)
{
// map(): replace the list item value
*** ../vim-8.2.1970/src/version.c 2020-11-09 21:04:12.203986366 +0100
--- src/version.c 2020-11-10 11:42:51.105995793 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1971,
/**/
--
hundred-and-one symptoms of being an internet addict:
226. You sit down at the computer right after dinner and your spouse
says "See you in the morning."
/// 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/202011101045.0AAAjDcr516561%40masaka.moolenaar.net.