To: vim_dev@googlegroups.com Subject: Patch 8.2.2882 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2882 Problem: Vim9: memory leak when lambda has an error. Solution: Free the list of argument types on failure. Files: src/userfunc.c *** ../vim-8.2.2881/src/userfunc.c 2021-05-18 15:09:13.963782700 +0200 --- src/userfunc.c 2021-05-24 15:39:02.967238634 +0200 *************** *** 1394,1400 **** --- 1394,1404 ---- ga_clear_strings(&newlines); ga_clear_strings(&default_args); if (types_optional) + { ga_clear_strings(&argtypes); + if (fp != NULL) + vim_free(fp->uf_arg_types); + } vim_free(fp); vim_free(pt); if (evalarg != NULL && evalarg->eval_tofree == NULL) *** ../vim-8.2.2881/src/version.c 2021-05-24 15:15:41.779049851 +0200 --- src/version.c 2021-05-24 15:40:00.143079812 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2882, /**/ -- Some say the world will end in fire; some say in segfaults. I say it will end in a curly bracket. /// 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 ///