To: vim_dev@googlegroups.com Subject: Patch 8.2.2748 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2748 Problem: Vim9: memory leak when calling :def function fails. Solution: Jump to failed_early instead of returning. Files: src/vim9execute.c *** ../vim-8.2.2747/src/vim9execute.c 2021-04-10 20:10:14.644409608 +0200 --- src/vim9execute.c 2021-04-10 20:45:59.505060218 +0200 *************** *** 1343,1349 **** emsg(_(e_one_argument_too_many)); else semsg(_(e_nr_arguments_too_many), idx); ! return FAIL; } // Put arguments on the stack, but no more than what the function expects. --- 1343,1349 ---- emsg(_(e_one_argument_too_many)); else semsg(_(e_nr_arguments_too_many), idx); ! goto failed_early; } // Put arguments on the stack, but no more than what the function expects. *** ../vim-8.2.2747/src/version.c 2021-04-10 20:10:14.644409608 +0200 --- src/version.c 2021-04-10 20:37:12.039951014 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2748, /**/ -- From "know your smileys": *<|:-) Santa Claus (Ho Ho Ho) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///