To: vim_dev@googlegroups.com Subject: Patch 8.2.1862 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///