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