Patch 8.2.1733

8 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 23, 2020, 12:51:49 PM9/23/20
to vim...@googlegroups.com

Patch 8.2.1733
Problem: Vim9: memory leaks when using nested function.
Solution: Free function when compilation fails.
Files: src/vim9compile.c


*** ../vim-8.2.1732/src/vim9compile.c 2020-09-23 13:25:28.398827624 +0200
--- src/vim9compile.c 2020-09-23 18:47:54.402982730 +0200
***************
*** 4408,4414 ****
--- 4408,4417 ----
return eap->skip ? (char_u *)"" : NULL;
if (ufunc->uf_def_status == UF_TO_BE_COMPILED
&& compile_def_function(ufunc, TRUE, cctx) == FAIL)
+ {
+ func_ptr_unref(ufunc);
return NULL;
+ }

if (is_global)
{
*** ../vim-8.2.1732/src/version.c 2020-09-23 17:41:09.845606730 +0200
--- src/version.c 2020-09-23 18:48:34.214882056 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1733,
/**/

--
Lower life forms have more fun!

/// 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