Patch 8.2.1862

9 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 18, 2020, 5:33:37 PM10/18/20
to vim...@googlegroups.com

Patch 8.2.1862
Problem: vim9: memory leak when compiling lambda fails.
Solution: Call clear_evalarg().
Files: src/vim9compile.c


*** ../vim-8.2.1861/src/vim9compile.c 2020-10-16 23:16:43.459258200 +0200
--- src/vim9compile.c 2020-10-18 23:30:09.471743429 +0200
***************
*** 2692,2698 ****
--- 2692,2701 ----

// Get the funcref in "rettv".
if (get_lambda_tv(arg, &rettv, &evalarg) != OK)
+ {
+ clear_evalarg(&evalarg, NULL);
return FAIL;
+ }

ufunc = rettv.vval.v_partial->pt_func;
++ufunc->uf_refcount;
*** ../vim-8.2.1861/src/version.c 2020-10-18 18:03:13.629155053 +0200
--- src/version.c 2020-10-18 23:31:53.159466018 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1862,
/**/

--
From "know your smileys":
@:-() Elvis Presley

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages